Module pepper.gnuplot
Gnuplot interface. This class can be used to generate graphical reports
Functions
| cmd (str) | Sends a command to Gnuplot |
| flush () | Finish plotting and restart the Gnuplot process. |
| plot_histogram (keys, values, titles, style, options) | Plots a histogram bar chart from data sequences. |
| plot_multi_series (keys, values, titles, style, options) | Plots multiple data series. |
| plot_pie (titles, values) | Plots a pie chart. |
| plot_series (keys, values, titles, options) | Plots one or more data series. |
| set_output (filename, width, height, terminal) | Sets the output file for plotting |
| set_title (title) | Sets the plot title |
| set_xrange (min, max) | Sets the X and X2 axis range |
| set_xrange_time (min, max) | Sets the X and X2 axis range |
Functions
- cmd (str)
-
Sends a command to Gnuplot
Parameters
- str: The command string
- flush ()
- Finish plotting and restart the Gnuplot process.
- plot_histogram (keys, values, titles, style, options)
-
Plots a histogram bar chart from data sequences. The
valuesparameter may contain multiple Y values per entry, i.e. it can be a two-dimensional array.
The lastoptionsparameter can either be a dictionary or a string. Using a dictionary, the following keys can be specified:Key Description Default value styleGnuplot style
Ifoptionsis a string, it will be used for thesytlekey.Parameters
- keys: The array of X values, used as the X-axis keys
- values: The array of Y values
- titles: Optional titles for the series
- style:
- options: Additional options (see above)
- plot_multi_series (keys, values, titles, style, options)
-
Plots multiple data series. The
keysandvaluesare arrays of the same size, each containing the same number of series. Each series (a pair of keys and values) will be plotted into the same graph.
The lastoptionsparameter can either be a dictionary or a string. Using a dictionary, the following keys can be specified:Key Description Default value styleGnuplot style "lines"
Ifoptionsis a string, it will be used for thesytlekey.Parameters
- keys: The series array with X values
- values: The series array with Y values
- titles: Optional titles for the series
- style:
- options: Additional options (see above)
- plot_pie (titles, values)
-
Plots a pie chart.
titlesis an array with titles that should be placed in the key.valueshas the same number of elements and defines percentage values for the titles. The values are expected to fall inside the interval [0,1].Parameters
- titles: Element titles
- values: Element percentage values from [0,1]
- plot_series (keys, values, titles, options)
-
Plots one or more data series. The
valuesparameter may contain multiple Y values per entry, i.e. it can be a two-dimensional array.
The lastoptionsparameter can either be a dictionary or a string. Using a dictionary, the following keys can be specified:Key Description Default value styleGnuplot style "lines"commandPlot command string, inserted after plot "$FILE"
Ifoptionsis a string, it will be used for thesytlekey.Parameters
- keys: The array of X values
- values: The array of Y values
- titles: Optional titles for the series
- options: Additional options (see above)
- set_output (filename, width, height, terminal)
-
Sets the output file for plotting
Parameters
- filename: Output filename
- width: Optional image width (defaults to 640)
- height: Optional image height (defaults to 480)
- terminal: Optional explicit terminal type. This is normally inferred from the filename.
- set_title (title)
-
Sets the plot title
Parameters
- title: The plot title
- set_xrange (min, max)
-
Sets the X and X2 axis range
Parameters
- min: Minimum X value
- max: Maximum X value
- set_xrange_time (min, max)
-
Sets the X and X2 axis range
Parameters
- min: Minimum X timestamp
- max: Maximum X timestamp