Plot Class Reference

#include <Plot.hpp>

Inheritance diagram for Plot:

Inheritance graph
[legend]
Collaboration diagram for Plot:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Plot ()
 Constructor.
 ~Plot ()
 Destructor.
void setXAxis (double min, double max, double gap=0)
 Set the minimum and maximum for x axis (doesn't effect columns).
void setYAxis (double min, double max, double gap=0)
 Set the minimum and maximum for y axis (doesn't effect rows).
void setXLabel (const char *str)
 Set the label for the x axis.
void setXLabel (const std::string &str)
 Set the label for the x axis.
void setYLabel (const char *str)
 Set the label for the y axis.
void setYLabel (const std::string &str)
 Set the label for the y axis.
Frame getPlotArea (Frame &frame)
 Get the Frame around which the axes will be drawn.
Frame getPlotArea (Frame *frame)
 Get the Frame around which the axes will be drawn.
void drawAxis (Frame &frame)
 Draw the axis in this Frame.
void drawAxis (Frame *frame)
 Draw the axis in this Frame.

Public Attributes

TextStyle label_style
 TextStyle for the labels.
AxisStyle axis_top
 Style for the north axis.
AxisStyle axis_bottom
 Style for the south axis.
AxisStyle axis_left
 Style for the left axis.
AxisStyle axis_right
 Style for the right axis.

Protected Member Functions

void drawLegend (Frame *frame, SeriesList *sl, unsigned int columns=1)
 Draw the legend in this Frame to some degree.

Protected Attributes

std::string xlabel
 X axis label.
bool fixedYaxis
 User has set the Y axis.
bool fixedXaxis
 User has set the X axis.
std::string ylabel
 Y axis label.
double minx
 Minimum x of the plot.
double width
 Width of the plot.
double xgap
 Gap from minimum x.
double miny
 Minimum y of the plot.
double height
 Height of the plot.
double ygap
 Gap from minimum y.

Constructor & Destructor Documentation

Plot  ) 
 

Constructor.

~Plot  )  [inline]
 

Destructor.

Definition at line 57 of file Plot.hpp.


Member Function Documentation

void drawAxis Frame frame  ) 
 

Draw the axis in this Frame.

void drawAxis Frame frame  )  [inline]
 

Draw the axis in this Frame.

Definition at line 90 of file Plot.hpp.

Referenced by ScatterPlot::drawPlot().

void drawLegend Frame frame,
SeriesList *  sl,
unsigned int  columns = 1
[inline, protected]
 

Draw the legend in this Frame to some degree.

Since it is difficult to determine the width of a specific string, for now this merely makes a single column of legend. This should be good for most generic plots.

Definition at line 155 of file Plot.hpp.

Referenced by ScatterPlot::drawKey(), and LinePlot::drawKey().

Frame getPlotArea Frame frame  ) 
 

Get the Frame around which the axes will be drawn.

Frame getPlotArea Frame frame  )  [inline]
 

Get the Frame around which the axes will be drawn.

Definition at line 81 of file Plot.hpp.

Referenced by ScatterPlot::drawPlot().

void setXAxis double  min,
double  max,
double  gap = 0
[inline]
 

Set the minimum and maximum for x axis (doesn't effect columns).

Definition at line 66 of file Plot.hpp.

Referenced by ScatterPlot::drawPlot().

void setXLabel const std::string &  str  )  [inline]
 

Set the label for the x axis.

Definition at line 74 of file Plot.hpp.

void setXLabel const char *  str  )  [inline]
 

Set the label for the x axis.

Examples:
example11.cpp.

Definition at line 72 of file Plot.hpp.

void setYAxis double  min,
double  max,
double  gap = 0
[inline]
 

Set the minimum and maximum for y axis (doesn't effect rows).

Definition at line 69 of file Plot.hpp.

Referenced by ScatterPlot::drawPlot().

void setYLabel const std::string &  str  )  [inline]
 

Set the label for the y axis.

Definition at line 78 of file Plot.hpp.

void setYLabel const char *  str  )  [inline]
 

Set the label for the y axis.

Examples:
example11.cpp.

Definition at line 76 of file Plot.hpp.


Member Data Documentation

AxisStyle axis_bottom
 

Style for the south axis.

Definition at line 109 of file Plot.hpp.

AxisStyle axis_left
 

Style for the left axis.

Definition at line 112 of file Plot.hpp.

AxisStyle axis_right
 

Style for the right axis.

Definition at line 115 of file Plot.hpp.

AxisStyle axis_top
 

Style for the north axis.

Definition at line 106 of file Plot.hpp.

bool fixedXaxis [protected]
 

User has set the X axis.

Definition at line 126 of file Plot.hpp.

bool fixedYaxis [protected]
 

User has set the Y axis.

Definition at line 123 of file Plot.hpp.

double height [protected]
 

Height of the plot.

Definition at line 144 of file Plot.hpp.

TextStyle label_style
 

TextStyle for the labels.

Definition at line 103 of file Plot.hpp.

double minx [protected]
 

Minimum x of the plot.

Definition at line 132 of file Plot.hpp.

double miny [protected]
 

Minimum y of the plot.

Definition at line 141 of file Plot.hpp.

double width [protected]
 

Width of the plot.

Definition at line 135 of file Plot.hpp.

double xgap [protected]
 

Gap from minimum x.

Definition at line 138 of file Plot.hpp.

std::string xlabel [protected]
 

X axis label.

Definition at line 120 of file Plot.hpp.

double ygap [protected]
 

Gap from minimum y.

Definition at line 147 of file Plot.hpp.

std::string ylabel [protected]
 

Y axis label.

Definition at line 129 of file Plot.hpp.


The documentation for this class was generated from the following file:
Generated on Tue May 21 03:31:38 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1