GTK+ IOStream
Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
|
simplistic plotting class which mimicks a octave approach to plotting Use this class as if you were plotting in octave. More...
#include <Plot.H>
Public Member Functions | |
Plot (void) | |
GtkWidget * | gca (void) |
Get the current axis. More... | |
GtkWidget * | getCurrentAxis (void) |
Get the current axis. More... | |
void | show (void) |
void | hide (void) |
void | plot (gfloat *x, gfloat *y, int cnt) |
void | plot (gfloat *x, gfloat *y, int cnt, const char *clsChar) |
void | plot (gfloat *x, gfloat *y, int cnt, ColourLineSpec &cls) |
void | plot (gfloat *x, gfloat *y1, gfloat *y2, int cnt) |
void | plot (gfloat *x, gfloat *y1, gfloat *y2, int cnt, const char *clsChar) |
void | plot (gfloat *x, gfloat *y1, gfloat *y2, int cnt, ColourLineSpec &cls) |
void | semilogx (gfloat *x, gfloat *y, int cnt) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour. More... | |
void | semilogx (gfloat *x, gfloat *y, int cnt, const char *clsChar) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale. More... | |
void | semilogx (gfloat *x, gfloat *y, int cnt, ColourLineSpec &cls) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale. More... | |
void | semilogx (gfloat *x, gfloat *y1, gfloat *y2, int cnt) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in offset bars. More... | |
void | semilogx (gfloat *x, gfloat *y1, gfloat *y2, int cnt, const char *clsChar) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in solid regions if line plotting. More... | |
void | semilogx (gfloat *x, gfloat *y1, gfloat *y2, int cnt, ColourLineSpec &cls) |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in solid regions if line plotting. More... | |
void | semilogy (gfloat *x, gfloat *y, int cnt) |
Plots with a logarithmic co-ordinate scale Plotting the data with a logarithmic co-ordinate scale and a default colour. More... | |
void | semilogy (gfloat *x, gfloat *y, int cnt, const char *clsChar) |
Plots with a logarithmic co-ordinate scale Plotting the data with a logarithmic co-ordinate scale. More... | |
void | semilogy (gfloat *x, gfloat *y, int cnt, ColourLineSpec &cls) |
Plots with a logarithmic co-ordinate scale Plotting the data with a logarithmic co-ordinate scale. More... | |
void | loglog (gfloat *x, gfloat *y, int cnt) |
Plots with logarithmic ordingate and co-ordinate scales Plotting the data with logarithmic ordinate and co-ordinate scales and a default colour. More... | |
void | loglog (gfloat *x, gfloat *y, int cnt, const char *clsChar) |
Plots with logarithmic ordingate and co-ordinate scales Plotting the data with logarithmic ordinate and co-ordinate scales and a default colour. More... | |
void | loglog (gfloat *x, gfloat *y, int cnt, ColourLineSpec &cls) |
Plots with logarithmic ordingate and co-ordinate scales Plotting the data with logarithmic ordinate and co-ordinate scales. More... | |
GtkDataboxGraph * | text (gfloat *x, gfloat *y, const char *textDisp, const char *clsChar) |
GtkDataboxGraph * | text (gfloat *x, gfloat *y, const char *textDisp, ColourLineSpec &cls) |
void | clear (void) |
void | clf (void) |
void | hold (bool on) |
void | grid (bool on) |
void | grid (bool on, int hCnt, gfloat *hLines, int vCnt, gfloat *vLines) |
void | limits (float min_x, float max_x, float min_y, float max_y) |
Set the limits of the viewable region of the plot. This will set the viewable rectangle to be between the min/max specified x and y values. More... | |
void | limits (gfloat border=0.) |
Set the limits to autoscale Rescales the figure to show everything plotted. More... | |
void | replot (void) |
Instruct gtk to replot If the underlying plot data pointers haven't changed, it is not necessary to call plot again. Simply call this method to get gtk to replot the contents of the data pointers used in the last call to Plot::plot. More... | |
void | set (GtkWidget *widget,...) |
sets the property of the figure Various figure axis settings. This list of settings must be NULL terminated. Valid options are (either camel or lower case): More... | |
void | connectAfter (const char *event, GCallback callback, gpointer data) |
void | xLabel (const char *label, int *indexes=NULL) |
void | xLabelBL (const char *label) |
void | yLabel (const char *label, int *indexes=NULL) |
void | yLabelTL (const char *label) |
void | title (const char *titleStr, int *indexes=NULL) |
void | title (GtkWidget *widget, int *indexes=NULL) |
![]() | |
Table (void) | |
Table (short int rows, short int cols, bool homogeneous=true, GtkAttachOptions xOpt=GTK_EXPAND, GtkAttachOptions yOpt=GTK_EXPAND, uint xPad=0, uint yPad=0) | |
void | initialise (short int rows=2, short int cols=2, bool homogeneous=true, GtkAttachOptions xOpt=GTK_FILL, GtkAttachOptions yOpt=GTK_FILL, uint xPad=0, uint yPad=0) |
void | setHomogeneous (bool homogeneous) |
void | setOptions (GtkAttachOptions xOpt, GtkAttachOptions yOpt) |
void | setRegion (short int x_s, short int x_e, short int y_s, short int y_e) |
void | placeWidget (GtkWidget *obj, GtkAttachOptions xOpt, GtkAttachOptions yOpt) |
void | placeWidget (GtkWidget *obj) |
void | getSize (uint *rows, uint *cols) |
void | setPadding (uint xPad, uint yPad) |
void | resize (uint rows, uint cols) |
Table & | operator<< (int *region) |
Table & | operator<< (GtkWidget *obj) |
Table & | operator<< (LinkList< GtkWidget * > &ll) |
Table & | operator>> (GtkWidget *obj) |
![]() | |
GtkWidget * | getWidget (void) |
GtkWidget * | show (void) |
GtkWidget * | hide (void) |
void | setBorder (unsigned int size) |
unsigned int | getBorder (void) |
Container & | operator<< (Container &b) |
Container & | operator<< (Container *b) |
Container & | operator<< (LinkList< GtkWidget * > &ll) |
Container & | operator>> (GtkWidget *b) |
Container & | operator>> (Container *b) |
Container & | operator>> (Container &b) |
![]() | |
virtual | ~Widget () |
Destructor. More... | |
GtkWidget * | ref (void) |
void | unref (void) |
Protected Attributes | |
GtkWidget * | axis |
The axis widget. More... | |
GtkDataboxGraph * | gridGraph |
The grid which defaults to off. More... | |
bool | holdOn |
Whether to hold the curves or not. More... | |
bool | gridOn |
Whether to the grid is on. More... | |
Additional Inherited Members | |
![]() | |
virtual void | pack (GtkWidget *obj) |
simplistic plotting class which mimicks a octave approach to plotting Use this class as if you were plotting in octave.
See the readme files for information on how to get/install GtkDatabox (which is required for this Plot class)
The Plot can support a title, xaxis, xlabel, ylabel, yaxis, plot, yaxis (right), ylabel (right) like so :
Here is an example of how to use :
Here is an example with two plots in the same window :
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the limits of the viewable region of the plot. This will set the viewable rectangle to be between the min/max specified x and y values.
min_x | The minimum x value to show |
max_x | The maximum x value to show |
min_y | The minimum y value to show |
max_y | The maximum y value to show |
Definition at line 508 of file Plot.H.
|
inline |
|
inline |
|
inline |
Plots with logarithmic ordingate and co-ordinate scales Plotting the data with logarithmic ordinate and co-ordinate scales and a default colour.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec object to use for plotting |
|
inline |
Plots with logarithmic ordingate and co-ordinate scales Plotting the data with logarithmic ordinate and co-ordinate scales.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec object to use for plotting |
|
inline |
|
inline |
Plots the cnt y values at x to the axis, with a specified colour and line type
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
clsChar | The specification to be used with the ColourLineSpec class |
|
inline |
Plots the cnt y values at x to the axis
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec class which determines the colour line type and size |
Definition at line 182 of file Plot.H.
|
inline |
|
inline |
Plots the cnt y1 and y2 values at x to the axis. This plot is a region of colour if a line plot is specified: e.g. clsChar="k" This plot is two dotted lines if a dotted plot is specified: e.g. clsChar="k:"
x | The ordinates for plotting |
y1 | The first co-ordinate for plotting |
y2 | The second co-ordinate for plotting |
cnt | The number of elements to plot |
clsChar | The specification to be used with the ColourLineSpec class |
|
inline |
Plots the cnt y1 and y2 values at x to the axis This plot is a region of colour if a line plot is specified: e.g. cls="k" This plot are offset bars if a dotted plot is specified: e.g. cls="k:"
x | The ordinates for plotting |
y1 | The first co-ordinate for plotting |
y2 | The second co-ordinate for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec class which determines the colour line type and size |
Definition at line 236 of file Plot.H.
|
inline |
Instruct gtk to replot If the underlying plot data pointers haven't changed, it is not necessary to call plot again. Simply call this method to get gtk to replot the contents of the data pointers used in the last call to Plot::plot.
Definition at line 524 of file Plot.H.
|
inline |
|
inline |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
clsChar | The ColourLineSpec interpretable character array |
|
inline |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec object to use for plotting |
|
inline |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in offset bars.
x | The ordinates for plotting |
y1 | The co-ordinates for plotting |
y2 | The co-ordinates for plotting |
cnt | The number of elements to plot |
|
inline |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in solid regions if line plotting.
x | The ordinates for plotting |
y1 | The co-ordinates for plotting |
y2 | The co-ordinates for plotting |
cnt | The number of elements to plot |
clsChar | The ColourLineSpec interpretable character array |
|
inline |
Plots with a logarithmic ordinate scale Plotting the data with a logarithmic ordinate scale and a default colour Each x ordinate has two y co-ordinates - resulting in solid regions if line plotting.
x | The ordinates for plotting |
y1 | The co-ordinates for plotting |
y2 | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec object to use for plotting |
|
inline |
|
inline |
Plots with a logarithmic co-ordinate scale Plotting the data with a logarithmic co-ordinate scale.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
clsChar | The ColourLineSpec interpretable character array |
|
inline |
Plots with a logarithmic co-ordinate scale Plotting the data with a logarithmic co-ordinate scale.
x | The ordinates for plotting |
y | The co-ordinates for plotting |
cnt | The number of elements to plot |
cls | The ColourLineSpec object to use for plotting |
|
inline |
sets the property of the figure Various figure axis settings. This list of settings must be NULL terminated. Valid options are (either camel or lower case):
In general, all properties, are specified for both X and Y axes.
Definition at line 588 of file Plot.H.
|
inline |
|
inline |
Displays text at an x and y location, with a specified colour
x | The ordinate to place the text at |
y | The co-ordinate to place the text at |
text | The text to display |
clsChar | The specification to be used with the ColourLineSpec class |
|
inline |
Displays text at an x and y location, with a specified colour
x | The ordinate to place the text at |
y | The co-ordinate to place the text at |
text | The text to display |
cls | The colour of the text |
Definition at line 428 of file Plot.H.
|
inline |
Set a title, by default the title is placed above the plot By changing the indexes, it can be placed in any table cell.
titleStr | The title to display |
indexes | The table cell to place the label in |
Definition at line 772 of file Plot.H.
|
inline |
Set a title, by default the title is placed above the plot By changing the indexes, it can be placed in any table cell.
widget | The title to display which is expected to be a label widget |
indexes | The table cell to place the label in |
|
inline |
Set an xlabel, by default the labels is placed below the plot. By changing the indexes, it can be placed in any table cell. For example this places it in the bottom left (same as xLabelBL) :
label | The label to display |
indexes | The table cell to place the label in |
Definition at line 713 of file Plot.H.
|
inline |
|
inline |
Set a ylabel, by default the label is placed left of the plot. By changing the indexes, it can be placed in any table cell. For example this places it in the top left (same as yLabelTL) :
label | The label to display |
indexes | The table cell to place the label in |
Definition at line 743 of file Plot.H.
|
inline |
|
protected |
|
protected |