49 #include <visp/vpConfig.h>
50 #include <visp/vpDebug.h>
52 #include <visp/vpPlot.h>
53 #include <visp/vpMath.h>
57 #if defined(VISP_HAVE_DISPLAY)
58 vpPlot plot(2, 700, 700, 100, 200,
"Curves...");
73 strncpy( title,
"cos function", 40 );
74 plot.setTitle(0,title);
75 strncpy( title,
"sin function", 40 );
76 plot.setTitle(1, title);
80 strncpy( legend,
"cos x", 40 );
81 plot.setLegend(0,0,legend);
82 strncpy( legend,
"sin x", 40 );
83 plot.setLegend(1,0, legend);
87 strncpy( unit,
"x", 40 );
88 plot.setUnitX(0,unit);
89 strncpy( unit,
"x", 40 );
90 plot.setUnitX(1,unit);
93 strncpy( unit,
"y", 40 );
94 plot.setUnitY(0,unit);
95 strncpy( unit,
"y", 40 );
96 plot.setUnitY(1,unit);
100 while(i <= 20*2*M_PI)
112 plot.saveData(0,
"dataCos.txt");
113 plot.saveData(0,
"dataSin.txt");
115 std::cout <<
"Plot functionalities are not avalaible since no display is available." << std::endl;
static const vpColor green
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
virtual bool getClick(bool blocking=true)=0