Provides plotting capabilities for most 2d graphs including bar charts, line graphs, scatter plots, or any combination of these. More...

#include <HGraph.h>

Public Member Functions

int AddDataSet (int points_count, const HPoint points[], HGraphPointFormat format=PointFormatCartesian, const HPoint colors[]=0)
 
double GetAspectRatio ()
 
void GetAxisColor (HGraphAxisSelection axis, char *color)
 
double GetAxisGridFrequency (HGraphAxisSelection axis)
 
void GetAxisGridRange (HGraphAxisSelection axis, double *min, double *max)
 
void GetAxisLabelTextColor (HGraphAxisSelection axis, char *color)
 
void GetAxisLabelTextFont (HGraphAxisSelection axis, char *font)
 
void GetAxisLabelTextPath (HGraphAxisSelection axis, float *xvector, float *yvector, float *zvector)
 
bool GetAxisLabelVisibility (HGraphAxisSelection axis)
 
int GetAxisPrecision (HGraphAxisSelection axis)
 
void GetAxisRange (HGraphAxisSelection axis, double *min, double *max)
 
HGraphAxisScale GetAxisScale (HGraphAxisSelection axis, double *factor=0)
 
double GetAxisTickFrequency (HGraphAxisSelection axis)
 
double GetAxisTickSize (HGraphAxisSelection axis)
 
bool GetAxisVisibility (HGraphAxisSelection axis)
 
float GetAxisWeight (HGraphAxisSelection axis)
 
void GetBarColorMap (int data_set, char *map)
 
void GetBarColorMapByValue (int data_set, int *count, HPoint values[], char *color_space)
 
bool GetBarEdgeVisibility (int data_set)
 
bool GetBarVisibility (int data_set)
 
double GetBarWidth (int data_set)
 
void GetDataSet (int data_set, HPoint points[])
 
HGraphPointFormat GetDataSetFormat (int data_set)
 
int GetDataSetSize (int data_set)
 
void GetGridColor (char *color)
 
void GetGridPattern (char *pattern)
 
HGraphGridType GetGridType ()
 
bool GetGridVisibility ()
 
void GetLineColor (int data_set, char *color)
 
void GetLinePattern (int data_set, char *pattern)
 
bool GetLineVisibility (int data_set)
 
float GetLineWeight (int data_set)
 
HGraphPlotType GetPlotType ()
 
void GetPointColor (int data_set, char *color)
 
float GetPointSize (int data_set)
 
void GetPointSymbol (int data_set, char *symbol)
 
bool GetPointVisibility (int data_set)
 
void GetPolygonColor (int data_set, char *color)
 
bool GetPolygonVisibility (int data_set)
 
 HPlot2D (HC_KEY plot_seg, HGraphPlotType plot_type=PlotTypeScatter)
 
void RemoveDataSet (int data_set)
 
void ReplaceDataSet (int data_set, int points_count, const HPoint points[], HGraphPointFormat format=PointFormatCartesian, const HPoint colors[]=0)
 
void SetAspectRatio (double ratio)
 
void SetAxisColor (HGraphAxisSelection axis, const char *color)
 
void SetAxisGridFrequency (HGraphAxisSelection axis, double freq)
 
void SetAxisGridRange (HGraphAxisSelection axis, double min, double max)
 
void SetAxisLabelTextColor (HGraphAxisSelection axis, const char *color)
 
void SetAxisLabelTextFont (HGraphAxisSelection axis, const char *font)
 
void SetAxisLabelTextPath (HGraphAxisSelection axis, float xvector, float yvector, float zvector)
 
void SetAxisLabelVisibility (HGraphAxisSelection axis, bool vis)
 
void SetAxisPrecision (HGraphAxisSelection axis, int precision)
 
void SetAxisRange (HGraphAxisSelection axis, double min, double max)
 
void SetAxisScale (HGraphAxisSelection axis, HGraphAxisScale scale, double factor=0.0)
 
void SetAxisTickFrequency (HGraphAxisSelection axis, double freq)
 
void SetAxisTickSize (HGraphAxisSelection axis, double size)
 
void SetAxisVisibility (HGraphAxisSelection axis, bool vis)
 
void SetAxisWeight (HGraphAxisSelection axis, float weight)
 
void SetBarColorMap (int data_set, const char *map)
 
void SetBarColorMapByValue (int data_set, int count, const HPoint values[], const char *color_space=0)
 
void SetBarEdgeVisibility (int data_set, bool vis)
 
void SetBarVisibility (int data_set, bool vis)
 
void SetBarWidth (int data_set, double width)
 
void SetGridColor (const char *color)
 
void SetGridPattern (const char *pattern)
 
void SetGridType (HGraphGridType gtype)
 
void SetGridVisibility (bool value)
 
void SetLineColor (int data_set, const char *color)
 
void SetLinePattern (int data_set, const char *pattern)
 
void SetLineVisibility (int data_set, bool vis)
 
void SetLineWeight (int data_set, float weight)
 
void SetPlotOrigin (HPoint origin)
 
void SetPlotTitle (const char *title)
 
void SetPlotUnicodeTitle (unsigned short *title)
 
void SetPointColor (int data_set, const char *color)
 
void SetPointSize (int data_set, double size)
 
void SetPointSymbol (int data_set, const char *symbol)
 
void SetPointVisibility (int data_set, bool vis)
 
void SetPolygonColor (int data_set, const char *color)
 
void SetPolygonVisibility (int data_set, bool vis)
 
void UnSetAspectRatio ()
 
virtual void Update ()
 
virtual ~HPlot2D ()
 
- Public Member Functions inherited from HBaseGraph
int AddLabel (const char *str, HPoint loc, HGraphPointFormat format=PointFormatCartesian, float xvector=1.0, float yvector=0.0, float zvector=0.0)
 
void AddLegend (HPoint loc, HGraphPointFormat format=PointFormatCartesian)
 
int AddLegendEntry (const char *str, const char *color, HGraphLegendEntryType ltype=LegendEntryTypeLine)
 
int AddLegendUnicodeEntry (const unsigned short *str, const char *color, HGraphLegendEntryType ltype=LegendEntryTypeLine)
 
int AddUnicodeLabel (const unsigned short *str, HPoint loc, HGraphPointFormat format=PointFormatCartesian, float xvector=1.0, float yvector=0.0, float zvector=0.0)
 
void ConvertPoints (unsigned int in_count, const HPoint in_points[], HGraphPointFormat in_system, HPoint out_points[], HGraphPointFormat out_system)
 
bool GetAutomaticUpdates ()
 
void GetFrameColor (char *color)
 
void GetFramePattern (char *pattern)
 
bool GetFrameVisibility ()
 
float GetFrameWeight ()
 
void GetLabelContents (int label_id, char *str)
 
HPoint GetLabelLocation (int label_id)
 
void GetLabelTextAlignment (int label_id, char *alignment)
 
void GetLabelTextColor (int label_id, char *color)
 
void GetLabelTextFont (int label_id, char *font)
 
void GetLabelTextPath (int label_id, float *xvector, float *yvector, float *zvector)
 
void GetLabelUnicodeContents (int label_id, unsigned short *str)
 
void GetLegendEntry (int entry_id, char *str, char *color, HGraphLegendEntryType *entry_type=0)
 
HPoint GetLegendLocation ()
 
void GetLegendTextFont (char *font)
 
void GetLegendTitle (char *title)
 
void GetLegendTitleTextFont (char *font)
 
void GetLegendUnicodeEntry (int entry_id, unsigned short *str, char *color, HGraphLegendEntryType *entry_type=0)
 
void GetLegendUnicodeTitle (unsigned short *title)
 
HPoint GetPlotOrigin ()
 
void GetPlotTitle (char *title)
 
virtual void GetPlotTitleColor (char *color)
 
HPoint GetPlotTitleLocation ()
 
void GetPlotTitleTextFont (char *font)
 
void GetPlotUnicodeTitle (unsigned short *title)
 
 HBaseGraph (HC_KEY plot_seg)
 
void PreserveData (bool preserve=true)
 
void RemoveLabel (int label_id)
 
void RemoveLegend ()
 
void RemoveLegendEntry (int entry_id)
 
void RemoveLegendTitle ()
 
void SetAutomaticUpdates (bool automatic=true)
 
void SetFrameColor (const char *color)
 
void SetFramePattern (const char *pattern)
 
void SetFrameVisibility (bool visible)
 
void SetFrameWeight (float weight)
 
void SetLabelContents (int label_id, const char *str)
 
void SetLabelLocation (int label_id, HPoint loc, HGraphPointFormat format=PointFormatCartesian)
 
void SetLabelTextAlignment (int label_id, const char *alignment)
 
void SetLabelTextColor (int label_id, const char *color)
 
void SetLabelTextFont (int label_id, const char *font)
 
void SetLabelTextPath (int label_id, float xvector, float yvector, float zvector)
 
void SetLabelUnicodeContents (int label_id, const unsigned short *str)
 
void SetLegendLocation (HPoint loc, HGraphPointFormat format=PointFormatCartesian)
 
void SetLegendTextFont (const char *font)
 
void SetLegendTitle (const char *title)
 
void SetLegendTitleTextFont (const char *font)
 
void SetLegendUnicodeTitle (const unsigned short *title)
 
void SetPlotOrigin (HPoint origin)
 
virtual void SetPlotTitleColor (const char *color)
 
void SetPlotTitleLocation (HPoint loc)
 
void SetPlotTitleTextFont (const char *font)
 
virtual ~HBaseGraph ()
 

Protected Member Functions

virtual void DrawAxes ()
 
virtual void DrawData (int data_set)
 
virtual void DrawFrame ()
 
virtual void DrawGrid ()
 
- Protected Member Functions inherited from HBaseGraph
virtual void DrawLegend ()
 

Protected Attributes

double m_aspect_ratio
 
HGraphGridType m_grid_type
 
HGraphPlotType m_plot_type
 
VArray< HGraphDataSetNode * > m_points
 
HGraphAxis m_x_axis
 
HGraphAxis m_y_axis
 
- Protected Attributes inherited from HBaseGraph
bool m_automatic_updates
 
bool m_force_update
 
VArray< HGraphLabelNode * > m_labels
 
HGraphLegend m_legend
 
HPoint m_origin
 
HC_KEY m_plot_segment
 
bool m_preserve_data
 
bool m_show_frame
 

Detailed Description

Provides plotting capabilities for most 2d graphs including bar charts, line graphs, scatter plots, or any combination of these.

Constructor & Destructor Documentation

◆ HPlot2D()

HPlot2D::HPlot2D ( HC_KEY  plot_seg,
HGraphPlotType  plot_type = PlotTypeScatter 
)

HPlot2D Constructor.

Parameters
plot_segThe segment that all graph subsegments will be created beneath.
plot_typeThe type of 2d plot preferred. This just affects the default visibilities for datasets created on this plot.

◆ ~HPlot2D()

virtual HPlot2D::~HPlot2D ( )
virtual

~HPlot2D Destructor

Member Function Documentation

◆ AddDataSet()

int HPlot2D::AddDataSet ( int  points_count,
const HPoint  points[],
HGraphPointFormat  format = PointFormatCartesian,
const HPoint  colors[] = 0 
)

Adds a data set to the plot.

Parameters
points_countThe number of points being passed.
pointsAn array of points in the data set. Passed by reference always.
formatThe format of the points. Default value: PointFormatCartesian.
colorsAn array of (RGB) color values, one per point, that override the colors of the data set. If used, this should be the same size as points.
Passed by reference always.
Returns
The ID of the data set. The ID can be used later for modifying or removing the data set.

◆ DrawAxes()

virtual void HPlot2D::DrawAxes ( )
protectedvirtual

Draw the graph axes.

◆ DrawData()

virtual void HPlot2D::DrawData ( int  data_set)
protectedvirtual

Draw a data set.

Parameters
data_setthe data set to be drawn or updated.

◆ DrawFrame()

virtual void HPlot2D::DrawFrame ( )
protectedvirtual

Draw a frame around the graph.

Implements HBaseGraph.

◆ DrawGrid()

virtual void HPlot2D::DrawGrid ( )
protectedvirtual

Draw the grid overlay for the graph.

◆ GetAspectRatio()

double HPlot2D::GetAspectRatio ( )

Get the forced aspect ratio.

◆ GetAxisColor()

void HPlot2D::GetAxisColor ( HGraphAxisSelection  axis,
char *  color 
)

Retrieves the color used to draw an axis.

Parameters
axisThe axis.
colorA string value for the color. Returned to user. Passed by reference always

◆ GetAxisGridFrequency()

double HPlot2D::GetAxisGridFrequency ( HGraphAxisSelection  axis)

Retrieves the frequency of lines along an axis when the grid is drawn.

Parameters
axisThe axis.
Returns
The grid line frequency.

◆ GetAxisGridRange()

void HPlot2D::GetAxisGridRange ( HGraphAxisSelection  axis,
double *  min,
double *  max 
)

Retrieves the range of an axis.

Parameters
axisThe axis.
minThe minimal value of the grid on the axis. Returned to user. Passed by reference always
maxThe maximal value of the grid on the axis. Returned to user. Passed by reference always

◆ GetAxisLabelTextColor()

void HPlot2D::GetAxisLabelTextColor ( HGraphAxisSelection  axis,
char *  color 
)

Retrieves the text font used for labels on an axis.

Parameters
axisThe axis.
colorA string value for the color. Returned to user. Passed by reference always.

◆ GetAxisLabelTextFont()

void HPlot2D::GetAxisLabelTextFont ( HGraphAxisSelection  axis,
char *  font 
)

Retrieves the text font used for labels on an axis.

Parameters
axisThe axis.
fontA string value for the font. Returned to user. Passed by reference always.

◆ GetAxisLabelTextPath()

void HPlot2D::GetAxisLabelTextPath ( HGraphAxisSelection  axis,
float *  xvector,
float *  yvector,
float *  zvector 
)

Sets the text path used for labels on an axis.

Parameters
axisThe axis.
xvectorThe x component of the text path vector. Returned to user.
yvectorThe y component of the text path vector. Returned to user.
zvectorThe z component of the text path vector. Returned to user.

◆ GetAxisLabelVisibility()

bool HPlot2D::GetAxisLabelVisibility ( HGraphAxisSelection  axis)
Returns
True if the axis labels are visible and false if otherwise.
Parameters
axisThe axis.

◆ GetAxisPrecision()

int HPlot2D::GetAxisPrecision ( HGraphAxisSelection  axis)

Gets the number of places after the decimal point that will be displayed.

Parameters
axisThe axis.
Returns
the number of places.

◆ GetAxisRange()

void HPlot2D::GetAxisRange ( HGraphAxisSelection  axis,
double *  min,
double *  max 
)

Retrieves the range of an axis.

Parameters
axisThe axis.
minThe minimal value of the axis. Returned to user. Passed by reference always
maxThe maximal value of the axis. Returned to user. Passed by reference always

◆ GetAxisScale()

HGraphAxisScale HPlot2D::GetAxisScale ( HGraphAxisSelection  axis,
double *  factor = 0 
)

Retrieves the scale used for labeling an axis.

Parameters
axisThe axis.
factorOptionally the scaling factor may be retrieved. Returned to user. Passed by reference always
Returns
The type of axis scaling performed.

◆ GetAxisTickFrequency()

double HPlot2D::GetAxisTickFrequency ( HGraphAxisSelection  axis)

Retrieves a value indicating how frequently regularly spaced ticks occur on the axis.

Parameters
axisThe axis.
Returns
The tick frequency.

◆ GetAxisTickSize()

double HPlot2D::GetAxisTickSize ( HGraphAxisSelection  axis)

Retrieves the size of tick marks along the axis.

Parameters
axisThe axis.
Returns
The tick size.

◆ GetAxisVisibility()

bool HPlot2D::GetAxisVisibility ( HGraphAxisSelection  axis)
Parameters
axisThe axis.
Returns
True if the given axis is visible and false if otherwise.

◆ GetAxisWeight()

float HPlot2D::GetAxisWeight ( HGraphAxisSelection  axis)

Retrieves the line weight of an axis.

Parameters
axisThe axis.
Returns
The line weight.

◆ GetBarColorMap()

void HPlot2D::GetBarColorMap ( int  data_set,
char *  map 
)

Retrieves the color map for the bars in a data set. Bars are colored in the order they appear in the data set point list. When the color map is exhausted, colors wrap around to the beginning.

Parameters
data_setThe ID of the data set.
mapA text string of all the colors in the color map. Returned to user. Passed by reference always.

◆ GetBarColorMapByValue()

void HPlot2D::GetBarColorMapByValue ( int  data_set,
int *  count,
HPoint  values[],
char *  color_space 
)

Retrieves a color map for the bars in a data set. Bars are colored in the order they appear in the data set point list. When the color map is exhausted, colors wrap around to the beginning.

Parameters
data_setThe ID of the data set.
countThe number of colors in the values array. Returned to user. Passed by reference always.
valuesAn array of HPoints containing all the colors in the color map. Returned to user. Passed by reference always.
color_spaceThe color space that the values are in. Returned to user. Passed by reference always.

◆ GetBarEdgeVisibility()

bool HPlot2D::GetBarEdgeVisibility ( int  data_set)
Parameters
data_setThe ID of the data set.
Returns
True if bar edges are drawn.

◆ GetBarVisibility()

bool HPlot2D::GetBarVisibility ( int  data_set)
Parameters
data_setThe ID of the data set.
Returns
True if the data set is interpreted as data points in a bar char.

◆ GetBarWidth()

double HPlot2D::GetBarWidth ( int  data_set)

Retrieves the width of bars, centered on data points.

Parameters
data_setThe ID of the data set.
Returns
The width of bars.

◆ GetDataSet()

void HPlot2D::GetDataSet ( int  data_set,
HPoint  points[] 
)

Retrieves the array of points in a data set. The points array should already be allocated and large enough to accommodate all the points in the set. Use GetDataSetSize to get the size of a data set.

Parameters
data_setThe ID of the data set.
pointsAn array of the points in the data set. Returned to user. Passed by reference always.

◆ GetDataSetFormat()

HGraphPointFormat HPlot2D::GetDataSetFormat ( int  data_set)

Retrieves the point format for a data set.

Parameters
data_setThe ID of the data set.
Returns
The point format.

◆ GetDataSetSize()

int HPlot2D::GetDataSetSize ( int  data_set)

Retrieves the number of points in a data set

Parameters
data_setThe ID of the data set.
Returns
The number of points.

◆ GetGridColor()

void HPlot2D::GetGridColor ( char *  color)

Retrieves the color used for the grid.

Parameters
colorThe color used for the grid. Returned to user. Passed by reference always.

◆ GetGridPattern()

void HPlot2D::GetGridPattern ( char *  pattern)

Retrieves the line pattern used for the grid.

Parameters
patternThe line pattern used for the grid. Returned to user. Passed by reference always.

◆ GetGridType()

HGraphGridType HPlot2D::GetGridType ( )

Retrieves the type of grid that will be drawn over the plot.

Returns
The type of grid.

◆ GetGridVisibility()

bool HPlot2D::GetGridVisibility ( )

Retrieves the visibility state of the grid.

Returns
True if the grid is visible and false if otherwise.

◆ GetLineColor()

void HPlot2D::GetLineColor ( int  data_set,
char *  color 
)

Retrieves the line color used for lines in the data set.

Parameters
data_setThe ID of the data set.
colorThe line color used for the data set. Returned to user. Passed by reference always.

◆ GetLinePattern()

void HPlot2D::GetLinePattern ( int  data_set,
char *  pattern 
)

Retrieves the line pattern used for lines in the data set.

Parameters
data_setThe ID of the data set.
patternThe line pattern used for the data set. Returned to user. Passed by reference always.

◆ GetLineVisibility()

bool HPlot2D::GetLineVisibility ( int  data_set)
Parameters
data_setThe ID of the data set.
Returns
True if points in a data set are connected by a polyline.

◆ GetLineWeight()

float HPlot2D::GetLineWeight ( int  data_set)

Retrieves the line weight of a data set.

Parameters
axisThe data set.
Returns
The line weight.

◆ GetPlotType()

HGraphPlotType HPlot2D::GetPlotType ( )

Retrieves the type of plot specified when creating the graph.

Returns
The type of plot specified when creating the graph.

◆ GetPointColor()

void HPlot2D::GetPointColor ( int  data_set,
char *  color 
)

Retrieves the color of points in a data set.

Parameters
data_setThe ID of the data set.
colorA color string. Returned to user. Passed by reference always.

◆ GetPointSize()

float HPlot2D::GetPointSize ( int  data_set)

Retrieves the size of points in a data set.

Parameters
data_setThe ID of the data set.
Returns
The size of points in the data set.

◆ GetPointSymbol()

void HPlot2D::GetPointSymbol ( int  data_set,
char *  symbol 
)

Retrieves the marker symbol for points in a data set.

Parameters
data_setThe ID of the data set.
symbolA string of special constants, see Set_Marker_Symbol(). Returned to user. Passed by reference always.

◆ GetPointVisibility()

bool HPlot2D::GetPointVisibility ( int  data_set)
Parameters
data_setThe ID of the data set.
Returns
True if points are drawn and false if otherwise.

◆ GetPolygonColor()

void HPlot2D::GetPolygonColor ( int  data_set,
char *  color 
)

Returns the color that a polygonal region will be drawn in if polygon visibility is on.

Parameters
data_setThe ID of the data set.
colorThe polygon color. Passed by reference always. Returned to user.

◆ GetPolygonVisibility()

bool HPlot2D::GetPolygonVisibility ( int  data_set)
Parameters
data_setThe ID of the data set.
Returns
True if the data set is considered the boundary of a colored region.

◆ RemoveDataSet()

void HPlot2D::RemoveDataSet ( int  data_set)

Removes a data set from the plot.

Parameters
data_setThe ID of the data set to be removed.

◆ ReplaceDataSet()

void HPlot2D::ReplaceDataSet ( int  data_set,
int  points_count,
const HPoint  points[],
HGraphPointFormat  format = PointFormatCartesian,
const HPoint  colors[] = 0 
)

Replaces the points in a data set.

Parameters
data_setThe ID of the data set.
points_countThe size of the points array.
pointsAn array of the points to be put into the data set. Passed by reference always.
formatThe point format of points. Default value: PointFormatCartesian.
colorsAn array of (RGB) color values, one per point, that override the colors of the data set. If used, this should be the same size as points.
Passed by reference always.

◆ SetAspectRatio()

void HPlot2D::SetAspectRatio ( double  ratio)

Constrain graph to this aspect ratio given as horizontal/vertical. To get a square, pass in 1.0. Aspect ratio will be maintained in this manner while underlying graph data is changed.

Parameters
ratioForced aspect ratio (double precision).

◆ SetAxisColor()

void HPlot2D::SetAxisColor ( HGraphAxisSelection  axis,
const char *  color 
)

Sets the color used to draw an axis.

Parameters
axisThe axis.
colorA string value for the color. Passed by reference always

◆ SetAxisGridFrequency()

void HPlot2D::SetAxisGridFrequency ( HGraphAxisSelection  axis,
double  freq 
)

Sets the frequency of lines along an axis when the grid is drawn.

Parameters
axisThe axis.
freqThe grid line frequency.

◆ SetAxisGridRange()

void HPlot2D::SetAxisGridRange ( HGraphAxisSelection  axis,
double  min,
double  max 
)

Sets the range of an axis. The minimal value must be less than or equal to the maximal value.

Parameters
axisThe axis.
minThe minimal value of the grid on the axis.
maxThe maximal value of the grid on the axis.

◆ SetAxisLabelTextColor()

void HPlot2D::SetAxisLabelTextColor ( HGraphAxisSelection  axis,
const char *  color 
)

Sets the text font used for labels on an axis.

Parameters
axisThe axis.
fontA string value for the color. Passed by reference always.

◆ SetAxisLabelTextFont()

void HPlot2D::SetAxisLabelTextFont ( HGraphAxisSelection  axis,
const char *  font 
)

Sets the text font used for labels on an axis.

Parameters
axisThe axis.
fontA string value for the font. Passed by reference always.

◆ SetAxisLabelTextPath()

void HPlot2D::SetAxisLabelTextPath ( HGraphAxisSelection  axis,
float  xvector,
float  yvector,
float  zvector 
)

Sets the text path used for labels on an axis.

Parameters
axisThe axis.
xvectorThe x component of the text path vector.
yvectorThe y component of the text path vector.
zvectorThe z component of the text path vector.

◆ SetAxisLabelVisibility()

void HPlot2D::SetAxisLabelVisibility ( HGraphAxisSelection  axis,
bool  vis 
)

This method sets the visibilty for the labels at each tick on the given axis.

Parameters
axisThe axis.
visThe visibility of labels on the axis.

◆ SetAxisPrecision()

void HPlot2D::SetAxisPrecision ( HGraphAxisSelection  axis,
int  precision 
)

Sets the number of places after the decimal point to display.

Parameters
axisThe axis.
precisionthe number of places to display.

◆ SetAxisRange()

void HPlot2D::SetAxisRange ( HGraphAxisSelection  axis,
double  min,
double  max 
)

Sets the range of an axis. The minimal value must be less than or equal the maximal value.

Parameters
axisThe axis.
minThe minimal value of the axis.
maxThe maximal value of the axis.

◆ SetAxisScale()

void HPlot2D::SetAxisScale ( HGraphAxisSelection  axis,
HGraphAxisScale  scale,
double  factor = 0.0 
)

Sets the scale used for labeling an axis.

Parameters
axisThe axis.
scaleThe type of axis scaling to be performed.
factorOptionally the scaling factor may also be set. Default value: 1.0 for linear, 10.0 for logarithmic.

◆ SetAxisTickFrequency()

void HPlot2D::SetAxisTickFrequency ( HGraphAxisSelection  axis,
double  freq 
)

Sets how frequently regularly spaced ticks occur on the axis.

Parameters
axisThe axis.
freqThe tick frequency.

◆ SetAxisTickSize()

void HPlot2D::SetAxisTickSize ( HGraphAxisSelection  axis,
double  size 
)

Sets the size of tick marks along the axis.

Parameters
axisThe axis.
sizeThe tick size.

◆ SetAxisVisibility()

void HPlot2D::SetAxisVisibility ( HGraphAxisSelection  axis,
bool  vis 
)

Set whether the specified axis is visible.

Parameters
axisThe axis.
visPass true to ensure that specified axis will be drawn and false if otherwise.

◆ SetAxisWeight()

void HPlot2D::SetAxisWeight ( HGraphAxisSelection  axis,
float  weight 
)

Sets the line weight of an axis.

Parameters
axisThe axis.
weightThe line weight.

◆ SetBarColorMap()

void HPlot2D::SetBarColorMap ( int  data_set,
const char *  map 
)

Sets a color map for the bars in a data set. Bars are colored in the order they appear in the data set point list. When the color map is exhausted, colors wrap around to the beginning.

Parameters
data_setThe ID of the data set.
mapA text string of all the colors in the color map. Passed by reference always.

◆ SetBarColorMapByValue()

void HPlot2D::SetBarColorMapByValue ( int  data_set,
int  count,
const HPoint  values[],
const char *  color_space = 0 
)

Sets a color map for the bars in a data set. Bars are colored in the order they appear in the data set point list. When the color map is exhausted, colors wrap around to the beginning.

Parameters
data_setThe ID of the data set.
countThe number of colors in the values array.
valuesAn array of HPoints containing all the colors in the color map. Passed by reference always.
color_spaceThe color space that the values are in. Default value: "RGB"

◆ SetBarEdgeVisibility()

void HPlot2D::SetBarEdgeVisibility ( int  data_set,
bool  vis 
)

Sets a flag indicating where the bar edges will be visible.

Parameters
data_setThe ID of the data set.
visPass true for bar edge to be visibile and false if otherwise.

◆ SetBarVisibility()

void HPlot2D::SetBarVisibility ( int  data_set,
bool  vis 
)

Determines if points in a data set are interpreted as data points for a bar chart.

Parameters
data_setThe ID of the data set.
visTrue if the data point are show in a bar chart

◆ SetBarWidth()

void HPlot2D::SetBarWidth ( int  data_set,
double  width 
)

Sets the width of bars. The bars are centered on data points.

Parameters
data_setThe ID of the data set.
widthThe width of bars.

◆ SetGridColor()

void HPlot2D::SetGridColor ( const char *  color)

Sets the color used for the grid.

Parameters
colorThe color used for the grid. Passed by reference always.

◆ SetGridPattern()

void HPlot2D::SetGridPattern ( const char *  pattern)

Sets the line pattern used for the grid.

Parameters
patternThe line pattern used for the grid. Passed by reference always.

◆ SetGridType()

void HPlot2D::SetGridType ( HGraphGridType  gtype)

Sets the type of grid that will be drawn over the plot.

Parameters
gtypeThe type of grid.

◆ SetGridVisibility()

void HPlot2D::SetGridVisibility ( bool  value)

Sets the visibility for the grid.

Parameters
valueThe grid visibility flag: true sets visibility on, false to off.

◆ SetLineColor()

void HPlot2D::SetLineColor ( int  data_set,
const char *  color 
)

Sets the line color used for lines in the data set.

Parameters
data_setThe ID of the data set.
colorThe line color used for the data set. Passed by reference always.

◆ SetLinePattern()

void HPlot2D::SetLinePattern ( int  data_set,
const char *  pattern 
)

Sets the line pattern used for lines in the data set.

Parameters
data_setThe ID of the data set.
patternThe line pattern used for the data set. Passed by reference always.

◆ SetLineVisibility()

void HPlot2D::SetLineVisibility ( int  data_set,
bool  vis 
)

Determines if points in a data set should be connected by a polyline.

Parameters
data_setThe ID of the data set.
visTrue if points in the given data set should be connected by a polyline.

◆ SetLineWeight()

void HPlot2D::SetLineWeight ( int  data_set,
float  weight 
)

Sets the line weight of a data set.

Parameters
axisThe data set.
weightThe line weight.

◆ SetPlotOrigin()

void HPlot2D::SetPlotOrigin ( HPoint  origin)

Retrieves the location of the plot origin.

Parameters
originAn HPoint value representing the new location of the title of the plot.

◆ SetPlotTitle()

void HPlot2D::SetPlotTitle ( const char *  title)
virtual

Adds a plot title or replaces the existing one.

Parameters
titleThe title of the plot.

Implements HBaseGraph.

◆ SetPlotUnicodeTitle()

void HPlot2D::SetPlotUnicodeTitle ( unsigned short *  title)
virtual

Adds a unicode plot title or replaces the existing one.

Parameters
titleThe title of the plot.

Implements HBaseGraph.

◆ SetPointColor()

void HPlot2D::SetPointColor ( int  data_set,
const char *  color 
)

Sets the color of points in a data set.

Parameters
data_setThe ID of the data set.
colorA color string. Passed by reference always.

◆ SetPointSize()

void HPlot2D::SetPointSize ( int  data_set,
double  size 
)

Sets the size of points in a data set.

Parameters
data_setThe ID of the data set.
sizeThe size of points in the data set

◆ SetPointSymbol()

void HPlot2D::SetPointSymbol ( int  data_set,
const char *  symbol 
)

Sets the marker symbol for points in a data set.

Parameters
data_setThe ID of the data set.
symbolA string of special constants, see Set_Marker_Symbol(). Passed by reference always.

◆ SetPointVisibility()

void HPlot2D::SetPointVisibility ( int  data_set,
bool  vis 
)

Use this method to determine if points should points be drawn.

Parameters
data_setThe ID of the data set.
visTrue if the points in the given data set should be drawn and false if otherwise.

◆ SetPolygonColor()

void HPlot2D::SetPolygonColor ( int  data_set,
const char *  color 
)

If polygon visibility is on, this sets the color of that polygon.

Parameters
data_setThe ID of the data set.
colorThe polygon color. Passed by reference always.

◆ SetPolygonVisibility()

void HPlot2D::SetPolygonVisibility ( int  data_set,
bool  vis 
)

Sets whether a data set should be considered the boundary of a colored region.

Parameters
data_setThe ID of the data set.
visThe polygon visibility.

◆ UnSetAspectRatio()

void HPlot2D::UnSetAspectRatio ( )

Remove the forced aspect ratio.

◆ Update()

virtual void HPlot2D::Update ( )
virtual

Force the segment tree to reflect any queued changes in the graph.

Reimplemented from HBaseGraph.


The documentation for this class was generated from the following file: