NPlot::HistogramPlot Class Reference

Provides ability to draw histogram plots. More...

Inheritance diagram for NPlot::HistogramPlot:

NPlot::BaseSequencePlot NPlot::IPlot NPlot::ISequencePlot NPlot::BasePlot NPlot::ISequencePlot NPlot::IDrawable List of all members.

Public Member Functions

 HistogramPlot ()
 Constructor.
void Draw (Graphics g, PhysicalAxis xAxis, PhysicalAxis yAxis)
 Renders the histogram.
Axis SuggestXAxis ()
 Returns an x-axis that is suitable for drawing this plot.
Axis SuggestYAxis ()
 Returns a y-axis that is suitable for drawing this plot.
void StackedTo (HistogramPlot hp)
 Stack the histogram to another HistogramPlot.
void DrawInLegend (Graphics g, Rectangle startEnd)
 Draws a representation of this plot in the legend.

Properties

IRectangleBrush RectangleBrush
 Set/Get the brush to use if the histogram is filled.
IRectangleBrush rectangleBrush_ = new RectangleBrushes.Solid( Color.Black )
bool Filled
 Whether or not the histogram columns will be filled.
bool filled_ = false
float baseWidth_ = 1.0f
float BaseWidth
 The width of the histogram bar as a proportion of the data spacing (in range 0.0 - 1.0).
bool center_ = true
bool Center
 If true, each histogram column will be centered on the associated abscissa value.
bool IsStacked
 If this histogram plot has another stacked on top, this will be true.
bool isStacked_
HistogramPlot stackedTo_
System.Drawing.Pen Pen
 The pen used to draw the plot.
System.Drawing.Pen pen_ = new Pen(Color.Black)
System.Drawing.Color Color
 The color of the pen used to draw lines in this plot.
double BaseOffset
 Horizontal position of histogram columns is offset by this much (in world coordinates).
double baseOffset_

Detailed Description

Provides ability to draw histogram plots.

Definition at line 63 of file HistogramPlot.cs.


Constructor & Destructor Documentation

NPlot::HistogramPlot::HistogramPlot  )  [inline]
 

Constructor.

Definition at line 87 of file HistogramPlot.cs.


Member Function Documentation

void NPlot::HistogramPlot::Draw Graphics  g,
PhysicalAxis  xAxis,
PhysicalAxis  yAxis
[inline]
 

Renders the histogram.

Parameters:
g The Graphics surface on which to draw
xAxis The X-Axis to draw against.
yAxis The Y-Axis to draw against.

Implements NPlot::IDrawable.

Definition at line 98 of file HistogramPlot.cs.

References NPlot::BaseSequencePlot::AbscissaData, baseOffset_, baseWidth_, center_, NPlot::SequenceAdapter::Count, NPlot::ISequencePlot::DataMember, NPlot::ISequencePlot::DataSource, Filled, NPlot::IRectangleBrush::Get(), isStacked_, NPlot::BaseSequencePlot::OrdinateData, Pen, NPlot::PhysicalAxis::PhysicalMin, rectangleBrush_, stackedTo_, NPlot::PhysicalAxis::WorldToPhysical(), NPlot::PointD::X, and NPlot::PointD::Y.

void NPlot::HistogramPlot::DrawInLegend Graphics  g,
Rectangle  startEnd
[inline]
 

Draws a representation of this plot in the legend.

Parameters:
g The graphics surface on which to draw.
startEnd A rectangle specifying the bounds of the area in the legend set aside for drawing.

Implements NPlot::IPlot.

Definition at line 450 of file HistogramPlot.cs.

References NPlot::IRectangleBrush::Get(), Pen, and rectangleBrush_.

void NPlot::HistogramPlot::StackedTo HistogramPlot  hp  )  [inline]
 

Stack the histogram to another HistogramPlot.

Definition at line 414 of file HistogramPlot.cs.

References NPlot::BaseSequencePlot::AbscissaData, NPlot::SequenceAdapter::Count, NPlot::ISequencePlot::DataMember, NPlot::ISequencePlot::DataSource, and NPlot::BaseSequencePlot::OrdinateData.

Axis NPlot::HistogramPlot::SuggestXAxis  )  [inline]
 

Returns an x-axis that is suitable for drawing this plot.

Returns:
A suitable x-axis.

Implements NPlot::IPlot.

Definition at line 260 of file HistogramPlot.cs.

References center_, NPlot::SequenceAdapter::Count, NPlot::SequenceAdapter::SuggestXAxis(), NPlot::Axis::WorldMax, NPlot::Axis::WorldMin, and NPlot::PointD::X.

Axis NPlot::HistogramPlot::SuggestYAxis  )  [inline]
 

Returns a y-axis that is suitable for drawing this plot.

Returns:
A suitable y-axis.

Implements NPlot::IPlot.

Definition at line 312 of file HistogramPlot.cs.

References NPlot::BaseSequencePlot::AbscissaData, NPlot::ISequencePlot::DataMember, NPlot::ISequencePlot::DataSource, NPlot::Axis::IncreaseRange(), isStacked_, NPlot::BaseSequencePlot::OrdinateData, stackedTo_, and NPlot::SequenceAdapter::SuggestYAxis().


Property Documentation

double NPlot::HistogramPlot::BaseOffset [get, set]
 

Horizontal position of histogram columns is offset by this much (in world coordinates).

Definition at line 507 of file HistogramPlot.cs.

double NPlot::HistogramPlot::baseOffset_ [private]
 

Definition at line 517 of file HistogramPlot.cs.

Referenced by Draw().

float NPlot::HistogramPlot::BaseWidth [get, set]
 

The width of the histogram bar as a proportion of the data spacing (in range 0.0 - 1.0).

Definition at line 237 of file HistogramPlot.cs.

float NPlot::HistogramPlot::baseWidth_ = 1.0f [private]
 

Definition at line 231 of file HistogramPlot.cs.

Referenced by Draw().

bool NPlot::HistogramPlot::Center [get, set]
 

If true, each histogram column will be centered on the associated abscissa value.

If false, each histogram colum will be drawn between the associated abscissa value, and the next abscissa value. Default value is true.

Definition at line 385 of file HistogramPlot.cs.

bool NPlot::HistogramPlot::center_ = true [private]
 

Definition at line 378 of file HistogramPlot.cs.

Referenced by Draw(), and SuggestXAxis().

System.Drawing.Color NPlot::HistogramPlot::Color [get, set]
 

The color of the pen used to draw lines in this plot.

Definition at line 484 of file HistogramPlot.cs.

bool NPlot::HistogramPlot::Filled [get, set]
 

Whether or not the histogram columns will be filled.

Definition at line 218 of file HistogramPlot.cs.

Referenced by Draw().

bool NPlot::HistogramPlot::filled_ = false [private]
 

Definition at line 228 of file HistogramPlot.cs.

bool NPlot::HistogramPlot::IsStacked [get]
 

If this histogram plot has another stacked on top, this will be true.

Else false.

Definition at line 401 of file HistogramPlot.cs.

bool NPlot::HistogramPlot::isStacked_ [private]
 

Definition at line 407 of file HistogramPlot.cs.

Referenced by Draw(), and SuggestYAxis().

System.Drawing.Pen NPlot::HistogramPlot::Pen [get, set]
 

The pen used to draw the plot.

Definition at line 467 of file HistogramPlot.cs.

Referenced by Draw(), and DrawInLegend().

System.Drawing.Pen NPlot::HistogramPlot::pen_ = new Pen(Color.Black) [private]
 

Definition at line 477 of file HistogramPlot.cs.

IRectangleBrush NPlot::HistogramPlot::RectangleBrush [get, set]
 

Set/Get the brush to use if the histogram is filled.

Definition at line 70 of file HistogramPlot.cs.

IRectangleBrush NPlot::HistogramPlot::rectangleBrush_ = new RectangleBrushes.Solid( Color.Black ) [private]
 

Definition at line 81 of file HistogramPlot.cs.

Referenced by Draw(), and DrawInLegend().

HistogramPlot NPlot::HistogramPlot::stackedTo_ [private]
 

Definition at line 410 of file HistogramPlot.cs.

Referenced by Draw(), and SuggestYAxis().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:08 2005 for NPlot by  doxygen 1.4.5