Gtkmm-PLplot 3.0
A scientific plotting library for Gtkmm
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Gtk::PLplot Namespace Reference

The namespace provided by Gtkmm-PLplot. More...

Classes

class  Canvas
 Principal plotting widget. More...
 
class  Exception
 Gtkmm-PLplot's exception handler class. More...
 
class  Legend
 a class providing legends for plot classes with multiple datasets More...
 
class  Object
 an abstract base class for all plots and plotdata's More...
 
class  Plot
 an abstract base class for all plots More...
 
class  Plot2D
 a class for two-dimensional plots More...
 
class  Plot3D
 a class for three-dimensional plots More...
 
class  PlotContour
 a class for contour plots More...
 
class  PlotContourShades
 a class for contour plots with shaded regions. More...
 
class  PlotData
 the abstract base class that will hold a single dataset and its properties More...
 
class  PlotData2D
 a class that will hold a single dataset and its properties for a Plot2D plot More...
 
class  PlotData2DErrorX
 a class that will hold a single XY dataset with X errorbars and its properties for a Plot2D plot More...
 
class  PlotData2DErrorXY
 a class that will hold a single XY dataset with X and Y errorbars and its properties for a Plot2D plot More...
 
class  PlotData2DErrorY
 a class that will hold a single XY dataset with Y errorbars and its properties for a Plot2D plot More...
 
class  PlotData3D
 a class that will hold a single dataset and its properties for a Plot3D plot More...
 
class  PlotDataHistogram
 abstract base class that will hold a single dataset that can be rendered as a histogram More...
 
class  PlotDataHistogramBinned
 a class that will hold a single binned histogram dataset and its properties for a PlotHistogram plot More...
 
class  PlotDataHistogramUnbinned
 a class that will hold a single unbinned histogram dataset and its properties for a PlotHistogram plot More...
 
class  PlotDataLine
 abstract base class that will hold a single dataset that can be rendered as a line More...
 
class  PlotDataPolar
 a class that will hold a single dataset and its properties for a PlotPolar plot More...
 
class  PlotDataSurface
 a class for surface datasets More...
 
class  PlotHistogram
 a class for plotting histograms More...
 
class  PlotObject
 the abstract base class that will hold a single plot object and its properties More...
 
class  PlotObject2D
 the abstract base class that will hold a single plot object and its properties that can be added to a plot containing 2D data, such as Plot2D, PlotContour, PlotPolar and PlotHistogram More...
 
struct  PlotObject2DAuxData
 class for auxiliary data to the drawing routine draw_plot_object() used from 2D plots More...
 
class  PlotObject2DLine
 Line object for 2D plots. More...
 
class  PlotObject2DText
 Text object for 2D plots. More...
 
struct  PlotObjectAuxData
 base class for auxiliary data to the drawing routine draw_plot_object() More...
 
class  PlotPolar
 a class for polar plots More...
 
class  RegionSelection
 a class providing support for selecting a region in a plot More...
 

Enumerations

enum  LineStyle {
  NONE = 0 , CONTINUOUS , SHORT_DASH_SHORT_GAP , LONG_DASH_LONG_GAP ,
  LONG_DASH_SHORT_GAP , LONG_DASH_SHORT_GAP_SHORT_DASH_SHORT_GAP , LONG_DASH_SHORT_GAP_LONG_DASH_SHORT_GAP , SHORT_DASH_SHORT_GAP_MEDIUM_DASH_MEDIUM_GAP_LONG_DASH_LONG_GAP ,
  SHORT_DASH_SHORT_GAP_MEDIUM_DASH_SHORT_GAP_LONG_DASH_SHORT_GAP
}
 
enum  BoxStyle {
  NO_BOX_NO_TICKS_NO_LABELS_NO_AXES = -2 , BOX_ONLY = -1 , BOX_TICKS_TICK_LABELS = 0 , BOX_TICKS_TICK_LABELS_MAIN_AXES = 1 ,
  BOX_TICKS_TICK_LABELS_MAIN_AXES_MAJOR_TICK_GRID = 2 , BOX_TICKS_TICK_LABELS_MAIN_AXES_MAJOR_MINOR_TICK_GRID = 3
}
 
enum  ColormapPalette {
  DEFAULT = 0 , BLUE_RED , BLUE_YELLOW , GRAY ,
  HIGHFREQ , LOWFREQ , RADAR
}
 
enum  AreaFillPattern {
  SOLID = 0 , HORIZONTAL_LINES , VERTICAL_LINES , UPWARD_LINES_45_DEGREES ,
  DOWNWARD_LINES_45_DEGREES , UPWARD_LINES_30_DEGREES , DOWNWARD_LINES_30_DEGREES , HORIZONTAL_AND_VERTICAL_LINES ,
  UPWARD_AND_DOWNWARD_LINES_45_DEGREES
}
 
enum  LegendCornerPosition { TOP_RIGHT = 0 , BOTTOM_RIGHT , TOP_LEFT , BOTTOM_LEFT }
 

Functions

std::vector< double > indgen (unsigned int n)
 
std::valarray< double > indgen_va (unsigned int n)
 
void change_plstream_color (plstream *pls, Gdk::RGBA color, bool activate=true, int index=2)
 
void change_plstream_colormap (plstream *pls, ColormapPalette colormap)
 
double ** calloc_array2d (int nx, int ny)
 
double ** deep_copy_array2d (double **input, int nx, int ny)
 
void free_array2d (void **input, int nx)
 

Detailed Description

The namespace provided by Gtkmm-PLplot.

Gtkmm-PLplot provides only one namespace, which is used to contain all of its classes. As it name shows, the namespace name was chosen on purpose to make it clear that it acts as an extension of the Gtkmm provided Gtk namespace. When including Gtkmm-PLplot in your code, you will have to prefix the class names with our namespace, or alternatively, include using namespace Gtk::PLplot; in your file.

Enumeration Type Documentation

◆ AreaFillPattern

Provides access to the different area fill patterns supported by PlotDataContour

Enumerator
SOLID 

solid fill of the area

HORIZONTAL_LINES 

horizontal lines

VERTICAL_LINES 

vertical lines

UPWARD_LINES_45_DEGREES 

lines at 45 degrees angle upward

DOWNWARD_LINES_45_DEGREES 

lines at 45 degrees angle downward

UPWARD_LINES_30_DEGREES 

lines at 30 degrees angle upward

DOWNWARD_LINES_30_DEGREES 

lines at 30 degrees angle downward

HORIZONTAL_AND_VERTICAL_LINES 

both horizontal and vertical lines

UPWARD_AND_DOWNWARD_LINES_45_DEGREES 

lines at 45 degrees angle upward and downward

◆ BoxStyle

Controls the appearance of the box around the plot

To be used in combination with Plot2D::set_box_style() and Plot2D::get_box_style()

Enumerator
NO_BOX_NO_TICKS_NO_LABELS_NO_AXES 

draw no box, no tick marks, no numeric tick labels, no axes

BOX_ONLY 

draw box only

BOX_TICKS_TICK_LABELS 

draw box, ticks, and numeric tick labels. This is the default

BOX_TICKS_TICK_LABELS_MAIN_AXES 

also draw coordinate axes at x=0 and y=0

BOX_TICKS_TICK_LABELS_MAIN_AXES_MAJOR_TICK_GRID 

also draw a grid at major tick positions in both coordinates

BOX_TICKS_TICK_LABELS_MAIN_AXES_MAJOR_MINOR_TICK_GRID 

also draw a grid at minor tick positions in both coordinates

◆ ColormapPalette

Provides access to the different colormaps supported by PLplot

Currently supported by PlotDataContour

Enumerator
DEFAULT 

the default colormap

BLUE_RED 

a gradient from blue to red

BLUE_YELLOW 

a gradient from blue to yellow

GRAY 

fifty shades of gray

HIGHFREQ 

to check

LOWFREQ 

to check

RADAR 

to check

◆ LegendCornerPosition

Determines which corner of the Legend box that will be used for the normalized coordinate system.

Enumerator
TOP_RIGHT 

top right corner

BOTTOM_RIGHT 

bottom right corner

TOP_LEFT 

top left corner

BOTTOM_LEFT 

bottom left corner

◆ LineStyle

Controls the line style of a PlotData2D dataset

To be used in combination with PlotData2D constructors and the PlotData2D::set_line_style() and PlotData2D::get_line_style() methods.

Enumerator
NONE 

no line will be plotted

CONTINUOUS 

a continuous, uninterrupted line will be drawn

SHORT_DASH_SHORT_GAP 

a line consisting of alternating short dashes and short gaps

LONG_DASH_LONG_GAP 

a line consisting of alternating long dashes and long gaps

LONG_DASH_SHORT_GAP 

a line consisting of alternating long dashes and short gaps

LONG_DASH_SHORT_GAP_SHORT_DASH_SHORT_GAP 

a line consisting of repeating sequences of a long dash, a short gap, a short dash and a short gap

LONG_DASH_SHORT_GAP_LONG_DASH_SHORT_GAP 

a line consisting of repeating sequences of a long dash, a short gap, a long dash and a short gap

SHORT_DASH_SHORT_GAP_MEDIUM_DASH_MEDIUM_GAP_LONG_DASH_LONG_GAP 

a line consisting of repeating sequences of a short dash, short gap, medium dash, medium gap, long dash and a long gap

SHORT_DASH_SHORT_GAP_MEDIUM_DASH_SHORT_GAP_LONG_DASH_SHORT_GAP 

a line consisting of repeating sequences of a short dash, short gap, medium dash, short gap, long dash and a short gap

Function Documentation

◆ calloc_array2d()

double ** Gtk::PLplot::calloc_array2d ( int  nx,
int  ny 
)

Allocates a an array of arrays

All elements will be initialized to zero. The return value should be freed with free_array2d();

Parameters
nxthe extent along the first coordinate of the array of arrays
nythe extent along the second coordinate of the array of arrays
Returns
a freshly allocated array of arrays of double's

◆ change_plstream_color()

void Gtk::PLplot::change_plstream_color ( plstream *  pls,
Gdk::RGBA  color,
bool  activate = true,
int  index = 2 
)

Changes the current color of the plstream

Convenience function that allows me to change PLplot's colormap

Parameters
plsa pointer to a plstream object
colorthe new color
activatemake this the currently active color for subsequent drawing commands
indexthe index that should be used for this color in PLplot's colormap

◆ change_plstream_colormap()

void Gtk::PLplot::change_plstream_colormap ( plstream *  pls,
ColormapPalette  colormap 
)

Changes the current colormap palette of the plstream

Convenience function that allows me to change PLplot's colormap palette for PlotDataContour

Parameters
plsa pointer to a plstream object
colormapthe new colormap

◆ deep_copy_array2d()

double ** Gtk::PLplot::deep_copy_array2d ( double **  input,
int  nx,
int  ny 
)

Creates a deep copy of a dynamically allocated array of dynamically allocated array of double's (double)

The return value should be freed with free_array2d(); This function is likely to produce a segmentation fault or result in undefined behavior when the input arguments are incorrect or invalid.

Parameters
inputthe array of arrays that will be copied
nxthe extent along the first coordinate of input
nythe extent along the second coordinate of input
Returns
a freshly allocated array of arrays of double's

◆ free_array2d()

void Gtk::PLplot::free_array2d ( void **  input,
int  nx 
)

Frees a dynamically allocated array of dynamically allocated arrays.

Typically used to free memory allocated by deep_copy_array2d().

Parameters
inputthe array of arrays that will be recursively freed.
nxthe extent along the first coordinate of input

◆ indgen()

std::vector< double > Gtk::PLplot::indgen ( unsigned int  n)

Returns a vector of doubles with each element set to the value of its subscript.

Parameters
nthe length of the vector

◆ indgen_va()

std::valarray< double > Gtk::PLplot::indgen_va ( unsigned int  n)

Returns a valarray of doubles with each element set to the value of its subscript.

Parameters
nthe length of the valarray