Class for lotting data with GNUplot.
This is a basic utility class, it just saves a temporary gpl file on disk and then calls the GNUplot utility from the system shell, so it does not require to link GNUplot libraries. If the GNUplot is not installed, simply nothing happens. NOTE: the GNUplot should be installed in your platform. Supported from release 4.6. NOTE: the GNUplot executable must be available in your PATH, i.e. if you type 'gnuplot' in the cmd window, it should be executed. If this does not happens, add the directory with the GNUplot binary to your PATH. In Linux platforms this should be already ok by default. NOTE: if no plot is displayed, open a cmd shell, type "gnuplot __tmp_gnuplot.gpl -persist" and see which error is displayed.
|
| ChGnuPlot (const char *mgpl_filename="__tmp_gnuplot.gpl") |
|
void | SetPersist (bool mpersist) |
| If false, the GNUplot will close soon after the plot. More...
|
|
void | SetCommand (const char *command) |
| This is the main feature. More...
|
|
ChGnuPlot & | operator<< (const char *command) |
| This is equivalent to SetCommand().
|
|
void | Plot (const char *datfile, int colX, int colY, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from a .dat external file.
|
|
void | Plot (ChVectorDynamic<> &mx, ChVectorDynamic<> &my, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from two column vectors.
|
|
void | Plot (ChMatrixConstRef mdata, int colX, int colY, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from two columns of a matrix.
|
|
void | Plot (ChFunction_Recorder &mrecorder, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from a ChFunction_recorder.
|
|
void | Plot (const std::vector< double > &vals_x, const std::vector< double > &vals_y, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from two std::vector<double>
|
|
void | Plot (ChFunction_Oscilloscope &mrecorder, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from a ChFunction_recorder.
|
|
void | Plot (ChFunction &mfunct, double xmin, double xmax, double dx, const char *title, const char *customsettings=" with lines ") |
| Shortcut to easy 2D plot of x,y data from a generic ChFunction Note, if the ChFunction is of type ChFunction_Oscilloscope or ChFunction_Recorder, there are specific Plot() functions that can leverage their point-like nature in a better way.
|
|
void | Replot () |
| Replot last plots (since the last time you used Output...() functions, if any).
|
|
void | SetRangeX (double mmin, double mmax, bool automin=false, bool automax=false) |
| Shortcut to add the command that set the X range.
|
|
void | SetRangeY (double mmin, double mmax, bool automin=false, bool automax=false) |
| Shortcut to add the command that set the Y range.
|
|
void | SetRangeZ (double mmin, double mmax, bool automin=false, bool automax=false) |
| Shortcut to add the command that set the Z range.
|
|
void | SetTitle (const char *mlabel) |
| Shortcut to add title.
|
|
void | SetLabelX (const char *mlabel) |
| Shortcut to add a label on axis.
|
|
void | SetLabelY (const char *mlabel) |
| Shortcut to add a label on axis.
|
|
void | SetLabelZ (const char *mlabel) |
| Shortcut to add a label on axis.
|
|
void | SetGrid (bool dashed=true, double linewidth=1.0, ChColor mcolor=ChColor(0, 0, 0)) |
| Shortcut to add the command that turns on the grid.
|
|
void | OutputWindow (int windownum=0) |
| Set plot in a window. More...
|
|
void | OutputPNG (const char *filename, int sizex=400, int sizey=300) |
| Save plot in a png file. More...
|
|
void | OutputEPS (const char *filename, double inchsizex=4, double inchsizey=3, bool color=true) |
| Save plot in a eps file. More...
|
|
void | OutputCustomTerminal (const char *filename, const char *terminalsetting) |
| Save plot in a custom terminal. More...
|
|