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)
59 vpPlot plot(2, 700, 700, 100, 200,
"Curves...");
74 strncpy( title,
"cos function", 40 );
75 plot.setTitle(0,title);
76 strncpy( title,
"sin function", 40 );
77 plot.setTitle(1, title);
81 strncpy( legend,
"cos x", 40 );
82 plot.setLegend(0,0,legend);
83 strncpy( legend,
"sin x", 40 );
84 plot.setLegend(1,0, legend);
88 strncpy( unit,
"x", 40 );
89 plot.setUnitX(0,unit);
90 strncpy( unit,
"x", 40 );
91 plot.setUnitX(1,unit);
94 strncpy( unit,
"y", 40 );
95 plot.setUnitY(0,unit);
96 strncpy( unit,
"y", 40 );
97 plot.setUnitY(1,unit);
101 while(i <= 20*2*M_PI)
113 plot.saveData(0,
"dataCos.txt");
114 plot.saveData(0,
"dataSin.txt");
118 std::cout <<
"Catch an exception: " << e << std::endl;
123 std::cout <<
"Plot functionalities are not avalaible since no display is available." << std::endl;
error that can be emited by ViSP classes.
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