Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
#include <bayeux/geomtools/gnuplot_i.h>
Public Member Functions | |
Gnuplot (const std::string &style="points") | |
set a style during construction More... | |
Gnuplot (const std::vector< double > &x, const std::string &title="", const std::string &style="points", const std::string &labelx="x", const std::string &labely="y") | |
plot a single std::vector at one go More... | |
Gnuplot (const std::vector< double > &x, const std::vector< double > &y, const std::string &title="", const std::string &style="points", const std::string &labelx="x", const std::string &labely="y") | |
plot pairs std::vector at one go More... | |
Gnuplot (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::string &title="", const std::string &style="points", const std::string &labelx="x", const std::string &labely="y", const std::string &labelz="z") | |
plot triples std::vector at one go More... | |
~Gnuplot () | |
destructor: needed to delete temporary files More... | |
bool | has_terminal () const |
Check if terminal is set. More... | |
void | set_terminal (const std::string &terminal_) |
Set the active terminal. More... | |
const std::string & | get_terminal () const |
Return the active terminal type. More... | |
Gnuplot & | cmd (const std::string &cmdstr) |
send a command to gnuplot More... | |
Gnuplot & | operator<< (const std::string &cmdstr) |
Sends a command to an active gnuplot session, identical to cmd () send a command to gnuplot using the << operator. More... | |
Gnuplot & | showonscreen () |
Gnuplot & | savetops (const std::string &filename="gnuplot_output") |
saves a gnuplot session to a postscript file, filename without extension More... | |
Gnuplot & | set_style (const std::string &stylestr="points") |
Gnuplot & | set_smooth (const std::string &stylestr="csplines") |
Gnuplot & | unset_smooth () |
unset smooth attention: smooth is not set by default More... | |
Gnuplot & | set_pointsize (const double pointsize=1.0) |
scales the size of the points used in plots More... | |
Gnuplot & | set_grid () |
turns grid on/off More... | |
Gnuplot & | unset_grid () |
grid is not set by default More... | |
Gnuplot & | set_multiplot () |
Gnuplot & | unset_multiplot () |
Gnuplot & | set_samples (const int samples=100) |
set sampling rate of functions, or for interpolating data More... | |
Gnuplot & | set_isosamples (const int isolines=10) |
set isoline density (grid) for plotting functions as surfaces (for 3d plots) More... | |
Gnuplot & | set_hidden3d () |
Gnuplot & | unset_hidden3d () |
Gnuplot & | set_contour (const std::string &position="base") |
Gnuplot & | unset_contour () |
Gnuplot & | set_surface () |
Gnuplot & | unset_surface () |
Gnuplot & | set_legend (const std::string &position="default") |
Gnuplot & | unset_legend () |
Switches legend off attention:legend is set by default. More... | |
Gnuplot & | set_title (const std::string &title="") |
sets and clears the title of a gnuplot session More... | |
Gnuplot & | unset_title () |
Clears the title of a gnuplot session The title is not set by default. More... | |
Gnuplot & | set_ylabel (const std::string &label="x") |
set x axis label More... | |
Gnuplot & | set_xlabel (const std::string &label="y") |
set y axis label More... | |
Gnuplot & | set_zlabel (const std::string &label="z") |
set z axis label More... | |
Gnuplot & | set_xrange (const double iFrom, const double iTo) |
set axis - ranges More... | |
Gnuplot & | set_yrange (const double iFrom, const double iTo) |
set y-axis - ranges More... | |
Gnuplot & | set_zrange (const double iFrom, const double iTo) |
set z-axis - ranges More... | |
Gnuplot & | set_xautoscale () |
Gnuplot & | set_yautoscale () |
Gnuplot & | set_zautoscale () |
Gnuplot & | set_xlogscale (const double base=10) |
turns on/off log scaling for the specified xaxis (logscale is not set by default) More... | |
Gnuplot & | set_ylogscale (const double base=10) |
turns on/off log scaling for the specified yaxis (logscale is not set by default) More... | |
Gnuplot & | set_zlogscale (const double base=10) |
turns on/off log scaling for the specified zaxis (logscale is not set by default) More... | |
Gnuplot & | unset_xlogscale () |
Gnuplot & | unset_ylogscale () |
Gnuplot & | unset_zlogscale () |
Gnuplot & | set_cbrange (const double iFrom, const double iTo) |
set palette range (autoscale by default) More... | |
Gnuplot & | plotfile_x (const std::string &filename, const unsigned int column=1, const std::string &title="") |
template<typename X > | |
Gnuplot & | plot_x (const X &x, const std::string &title="") |
from std::vector More... | |
Gnuplot & | plotfile_xy (const std::string &filename, const unsigned int column_x=1, const unsigned int column_y=2, const std::string &title="") |
Gnuplot & | plotfile_xy (const std::string &filename, const unsigned int column_x, const unsigned int column_y, const std::string &title, const std::string &file_options_, const std::string &plot_options_) |
template<typename X , typename Y > | |
Gnuplot & | plot_xy (const X &x, const Y &y, const std::string &title="") |
from data More... | |
Gnuplot & | plotfile_xy_err (const std::string &filename, const unsigned int column_x=1, const unsigned int column_y=2, const unsigned int column_dy=3, const std::string &title="") |
template<typename X , typename Y , typename E > | |
Gnuplot & | plot_xy_err (const X &x, const Y &y, const E &dy, const std::string &title="") |
from data More... | |
Gnuplot & | plotfile_xyz (const std::string &filename, const unsigned int column_x=1, const unsigned int column_y=2, const unsigned int column_z=3, const std::string &title="") |
Gnuplot & | plotfile_xyzo (const std::string &filename, const unsigned int column_x=1, const unsigned int column_y=2, const unsigned int column_z=3, const unsigned int column_o=4, const std::string &title="") |
Gnuplot & | plotfile_xyz_with_colored_wires (const std::string &filename, const std::string &title="", int color_=0) |
template<typename X , typename Y , typename Z > | |
Gnuplot & | plot_xyz (const X &x, const Y &y, const Z &z, const std::string &title="") |
from std::vector More... | |
Gnuplot & | plot_slope (const double a, const double b, const std::string &title="") |
plot an equation of the form: y = ax + b, you supply a and b More... | |
Gnuplot & | plot_equation (const std::string &equation, const std::string &title="") |
Gnuplot & | plot_equation3d (const std::string &equation, const std::string &title="") |
Gnuplot & | plot_image (const unsigned char *ucPicBuf, const unsigned int iWidth, const unsigned int iHeight, const std::string &title="") |
plot image More... | |
Gnuplot & | replot (void) |
replot repeats the last plot or splot command. this can be useful for viewing a plot with different set options, or when generating the same plot for several devices (showonscreen, savetops) More... | |
Gnuplot & | reset_plot () |
resets a gnuplot session (next plot will erase previous ones) More... | |
Gnuplot & | reset_all () |
resets a gnuplot session and sets all variables to default More... | |
void | remove_tmpfiles () |
deletes temporary files More... | |
bool | is_valid () |
Is the gnuplot session valid ?? More... | |
Static Public Member Functions | |
static const std::string & | terminal_std () |
Return the default terminal type on the current system. More... | |
static bool | set_gnuplot_path (const std::string &path) |
optional function: set Gnuplot path manual attention: for windows: path with slash '/' not backslash '\' More... | |
static void | set_terminal_std (const std::string &type) |
Gnuplot::Gnuplot | ( | const std::string & | style = "points" | ) |
set a style during construction
Gnuplot::Gnuplot | ( | const std::vector< double > & | x, |
const std::string & | title = "" , |
||
const std::string & | style = "points" , |
||
const std::string & | labelx = "x" , |
||
const std::string & | labely = "y" |
||
) |
plot a single std::vector at one go
Gnuplot::Gnuplot | ( | const std::vector< double > & | x, |
const std::vector< double > & | y, | ||
const std::string & | title = "" , |
||
const std::string & | style = "points" , |
||
const std::string & | labelx = "x" , |
||
const std::string & | labely = "y" |
||
) |
plot pairs std::vector at one go
Gnuplot::Gnuplot | ( | const std::vector< double > & | x, |
const std::vector< double > & | y, | ||
const std::vector< double > & | z, | ||
const std::string & | title = "" , |
||
const std::string & | style = "points" , |
||
const std::string & | labelx = "x" , |
||
const std::string & | labely = "y" , |
||
const std::string & | labelz = "z" |
||
) |
plot triples std::vector at one go
Gnuplot::~Gnuplot | ( | ) |
destructor: needed to delete temporary files
Gnuplot& Gnuplot::cmd | ( | const std::string & | cmdstr | ) |
send a command to gnuplot
const std::string& Gnuplot::get_terminal | ( | ) | const |
Return the active terminal type.
bool Gnuplot::has_terminal | ( | ) | const |
Check if terminal is set.
|
inline |
Is the gnuplot session valid ??
|
inline |
Sends a command to an active gnuplot session, identical to cmd () send a command to gnuplot using the << operator.
cmdstr | --> the command string |
Gnuplot& Gnuplot::plot_equation | ( | const std::string & | equation, |
const std::string & | title = "" |
||
) |
plot an equation supplied as a std::string y=f (x), write only the function f (x) not y= the independent variable has to be x binary operators: ** exponentiation, * multiply, / divide, + add, - substract, % modulo unary operators: - minus, ! factorial elementary functions: rand (x), abs (x), sgn (x), ceil (x), floor (x), int (x), imag (x), real (x), arg (x), sqrt (x), exp (x), log (x), log10 (x), sin (x), cos (x), tan (x), asin (x), acos (x), atan (x), atan2 (y,x), sinh (x), cosh (x), tanh (x), asinh (x), acosh (x), atanh (x) special functions: erf (x), erfc (x), inverf (x), gamma (x), igamma (a,x), lgamma (x), ibeta (p,q,x), besj0 (x), besj1 (x), besy0 (x), besy1 (x), lambertw (x) statistical fuctions: norm (x), invnorm (x)
Gnuplot& Gnuplot::plot_equation3d | ( | const std::string & | equation, |
const std::string & | title = "" |
||
) |
plot an equation supplied as a std::string z=f (x,y), write only the function f (x,y) not z= the independent variables have to be x and y
Gnuplot& Gnuplot::plot_image | ( | const unsigned char * | ucPicBuf, |
const unsigned int | iWidth, | ||
const unsigned int | iHeight, | ||
const std::string & | title = "" |
||
) |
plot image
Gnuplot& Gnuplot::plot_slope | ( | const double | a, |
const double | b, | ||
const std::string & | title = "" |
||
) |
plot an equation of the form: y = ax + b, you supply a and b
|
inline |
from std::vector
Plots a 2d graph from a list of doubles: x
|
inline |
from data
Plots a 2d graph from a list of doubles: x y
|
inline |
from data
plot x,y pairs with dy errorbars
|
inline |
from std::vector
Gnuplot& Gnuplot::plotfile_x | ( | const std::string & | filename, |
const unsigned int | column = 1 , |
||
const std::string & | title = "" |
||
) |
plot a single std::vector: x from file
Gnuplot& Gnuplot::plotfile_xy | ( | const std::string & | filename, |
const unsigned int | column_x = 1 , |
||
const unsigned int | column_y = 2 , |
||
const std::string & | title = "" |
||
) |
plot x,y pairs: x y from file
Gnuplot& Gnuplot::plotfile_xy | ( | const std::string & | filename, |
const unsigned int | column_x, | ||
const unsigned int | column_y, | ||
const std::string & | title, | ||
const std::string & | file_options_, | ||
const std::string & | plot_options_ | ||
) |
Gnuplot& Gnuplot::plotfile_xy_err | ( | const std::string & | filename, |
const unsigned int | column_x = 1 , |
||
const unsigned int | column_y = 2 , |
||
const unsigned int | column_dy = 3 , |
||
const std::string & | title = "" |
||
) |
plot x,y pairs with dy errorbars: x y dy from file
Gnuplot& Gnuplot::plotfile_xyz | ( | const std::string & | filename, |
const unsigned int | column_x = 1 , |
||
const unsigned int | column_y = 2 , |
||
const unsigned int | column_z = 3 , |
||
const std::string & | title = "" |
||
) |
plot x,y,z triples: x y z from file
Gnuplot& Gnuplot::plotfile_xyz_with_colored_wires | ( | const std::string & | filename, |
const std::string & | title = "" , |
||
int | color_ = 0 |
||
) |
Gnuplot& Gnuplot::plotfile_xyzo | ( | const std::string & | filename, |
const unsigned int | column_x = 1 , |
||
const unsigned int | column_y = 2 , |
||
const unsigned int | column_z = 3 , |
||
const unsigned int | column_o = 4 , |
||
const std::string & | title = "" |
||
) |
void Gnuplot::remove_tmpfiles | ( | ) |
deletes temporary files
|
inline |
replot repeats the last plot or splot command. this can be useful for viewing a plot with different set options, or when generating the same plot for several devices (showonscreen, savetops)
Gnuplot& Gnuplot::reset_all | ( | ) |
resets a gnuplot session and sets all variables to default
Gnuplot& Gnuplot::reset_plot | ( | ) |
resets a gnuplot session (next plot will erase previous ones)
Gnuplot& Gnuplot::savetops | ( | const std::string & | filename = "gnuplot_output" | ) |
saves a gnuplot session to a postscript file, filename without extension
Gnuplot& Gnuplot::set_cbrange | ( | const double | iFrom, |
const double | iTo | ||
) |
set palette range (autoscale by default)
Gnuplot& Gnuplot::set_contour | ( | const std::string & | position = "base" | ) |
enables/disables contour drawing for surfaces (for 3d plot) base, surface, both
|
static |
optional function: set Gnuplot path manual attention: for windows: path with slash '/' not backslash '\'
path | --> the gnuplot path |
|
inline |
turns grid on/off
|
inline |
enables/disables hidden line removal for surface plotting (for 3d plot)
Gnuplot& Gnuplot::set_isosamples | ( | const int | isolines = 10 | ) |
set isoline density (grid) for plotting functions as surfaces (for 3d plots)
Gnuplot& Gnuplot::set_legend | ( | const std::string & | position = "default" | ) |
switches legend on/off position: inside/outside, left/center/right, top/center/bottom, nobox/box
|
inline |
set the mulitplot mode
Gnuplot& Gnuplot::set_pointsize | ( | const double | pointsize = 1.0 | ) |
scales the size of the points used in plots
Gnuplot& Gnuplot::set_samples | ( | const int | samples = 100 | ) |
set sampling rate of functions, or for interpolating data
Gnuplot& Gnuplot::set_smooth | ( | const std::string & | stylestr = "csplines" | ) |
interpolation and approximation of data, arguments: csplines, bezier, acsplines (for data values > 0), sbezier, unique, frequency (works only with plot_x, plot_xy, plotfile_x, plotfile_xy (if smooth is set, set_style has no effekt on data plotting)
Gnuplot& Gnuplot::set_style | ( | const std::string & | stylestr = "points" | ) |
set line style (some of these styles require additional information): lines, points, linespoints, impulses, dots, steps, fsteps, histeps, boxes, histograms, filledcurves
|
inline |
enables/disables the display of surfaces (for 3d plot)
void Gnuplot::set_terminal | ( | const std::string & | terminal_ | ) |
Set the active terminal.
|
static |
optional: set standart terminal, used by showonscreen defaults: Windows - win, Linux - x11, Mac - aqua
type | --> the terminal type |
|
inline |
sets and clears the title of a gnuplot session
title | --> the title of the plot [optional, default == ""] |
|
inline |
autoscale axis (set by default) of xaxis
Gnuplot& Gnuplot::set_xlabel | ( | const std::string & | label = "y" | ) |
set y axis label
Gnuplot& Gnuplot::set_xlogscale | ( | const double | base = 10 | ) |
turns on/off log scaling for the specified xaxis (logscale is not set by default)
Gnuplot& Gnuplot::set_xrange | ( | const double | iFrom, |
const double | iTo | ||
) |
set axis - ranges
|
inline |
autoscale axis (set by default) of yaxis
Gnuplot& Gnuplot::set_ylabel | ( | const std::string & | label = "x" | ) |
set x axis label
Gnuplot& Gnuplot::set_ylogscale | ( | const double | base = 10 | ) |
turns on/off log scaling for the specified yaxis (logscale is not set by default)
Gnuplot& Gnuplot::set_yrange | ( | const double | iFrom, |
const double | iTo | ||
) |
set y-axis - ranges
|
inline |
autoscale axis (set by default) of zaxis
Gnuplot& Gnuplot::set_zlabel | ( | const std::string & | label = "z" | ) |
set z axis label
Gnuplot& Gnuplot::set_zlogscale | ( | const double | base = 10 | ) |
turns on/off log scaling for the specified zaxis (logscale is not set by default)
Gnuplot& Gnuplot::set_zrange | ( | const double | iFrom, |
const double | iTo | ||
) |
set z-axis - ranges
Gnuplot& Gnuplot::showonscreen | ( | ) |
sets terminal type to terminal (default to Gnuplot::g_terminal_std) window output is set by default (win/x11/aqua)
|
static |
Return the default terminal type on the current system.
|
inline |
contour is not set by default, it disables contour drawing for surfaces
|
inline |
grid is not set by default
|
inline |
hidden3d is not set by default
|
inline |
Switches legend off attention:legend is set by default.
|
inline |
unsets the mulitplot mode
|
inline |
unset smooth attention: smooth is not set by default
|
inline |
surface is set by default, it disables the display of surfaces (for 3d plot)
|
inline |
Clears the title of a gnuplot session The title is not set by default.
|
inline |
turns off log scaling for the x axis
|
inline |
turns off log scaling for the y axis
|
inline |
turns off log scaling for the z axis