GClasses
GClasses::GPlotLabelSpacerLogarithmic Class Reference

Detailed Description

Similar to GPlotLabelSpacer, except for logarithmic grids. To plot in logarithmic space, set your plot window to have a range from log_e(min) to log_e(max). When you actually plot things, plot them at log_e(x), where x is the position of the thing you want to plot.

#include <GPlot.h>

Public Member Functions

 GPlotLabelSpacerLogarithmic (double log_e_min, double log_e_max)
 Pass in the log (base e) of your min and max values. (We make you pass them in logarithmic form, so you can't use a negative min value.) More...
 
bool next (double *pos, bool *primary)
 Returns true and sets *pos to the position of the next label. (You should actually plot it at log_e(*pos) in your plot window.) Returns false if there are no more (and doesn't set *pos). primary is set to true if the label is the primary label for the new scale. More...
 

Protected Attributes

int m_i
 
double m_max
 
int m_n
 

Constructor & Destructor Documentation

GClasses::GPlotLabelSpacerLogarithmic::GPlotLabelSpacerLogarithmic ( double  log_e_min,
double  log_e_max 
)

Pass in the log (base e) of your min and max values. (We make you pass them in logarithmic form, so you can't use a negative min value.)

Member Function Documentation

bool GClasses::GPlotLabelSpacerLogarithmic::next ( double *  pos,
bool *  primary 
)

Returns true and sets *pos to the position of the next label. (You should actually plot it at log_e(*pos) in your plot window.) Returns false if there are no more (and doesn't set *pos). primary is set to true if the label is the primary label for the new scale.

Member Data Documentation

int GClasses::GPlotLabelSpacerLogarithmic::m_i
protected
double GClasses::GPlotLabelSpacerLogarithmic::m_max
protected
int GClasses::GPlotLabelSpacerLogarithmic::m_n
protected