45 #include <visp3/core/vpConfig.h> 46 #include <visp3/core/vpDebug.h> 48 #include <visp3/gui/vpPlot.h> 49 #include <visp3/core/vpMath.h> 53 #if defined(VISP_HAVE_DISPLAY) 55 vpPlot plot(2, 700, 700, 100, 200,
"Curves...");
70 strncpy( title,
"cos function", 40 );
71 plot.setTitle(0,title);
72 strncpy( title,
"sin function", 40 );
73 plot.setTitle(1, title);
77 strncpy( legend,
"cos x", 40 );
78 plot.setLegend(0,0,legend);
79 strncpy( legend,
"sin x", 40 );
80 plot.setLegend(1,0, legend);
84 strncpy( unit,
"x", 40 );
85 plot.setUnitX(0,unit);
86 strncpy( unit,
"x", 40 );
87 plot.setUnitX(1,unit);
90 strncpy( unit,
"y", 40 );
91 plot.setUnitY(0,unit);
92 strncpy( unit,
"y", 40 );
93 plot.setUnitY(1,unit);
109 plot.saveData(0,
"dataCos.txt",
"# ");
110 plot.saveData(1,
"dataSin.txt",
"# ");
114 std::cout <<
"Catch an exception: " << e << std::endl;
119 std::cout <<
"Plot functionalities are not avalaible since no display is available." << std::endl;
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
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...