BarPlot

A basic bar plot.

Members

Functions

barColor
Color barColor()

Controls the color of the bar. Defaults to blue.

barColor
This barColor(Color newColor)

Setter

centers
const(double)[] centers()

Get the centers of the bars.

drawLegendSymbol
void drawLegendSymbol(FigureBase fig, PlotRect where)
Undocumented in source. Be warned that the author may not have intended to support it.
drawPlot
void drawPlot(Figure form, double leftMargin, double topMargin, double plotWidth, double plotHeight)
Undocumented in source. Be warned that the author may not have intended to support it.
heights
const(double)[] heights()

Get the heights of the bars.

lowerErrors
const(double)[] lowerErrors()
outlineBar
bool outlineBar()

Controls whether each bar is outlined in a black rectange.

outlineBar
This outlineBar(bool shouldOutline)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleCenters
void scaleCenters(double scaleFactor)

Scale this object by a factor of scaleFactor in the X direction. This is useful for getting it onto the same scale as another plot.

scaleHeights
void scaleHeights(double scaleFactor)

Scale this object by a factor of scaleFactor in the Y direction. * This is useful for getting it onto the same scale as another plot.

shiftCenters
void shiftCenters(double shiftBy)

Shift this graph by shiftBy units in the X direction. This is useful for getting it onto the same scale as another plot.

stack
BarPlot stack(R heights)

Create a BarPlot that is to be stacked on top of this one. For a convenience function for creating such a plot, see stackedBar().

toLabeledFigure
Figure toLabeledFigure()

The default labeling includes each center receiving its own x tick label if there are <= 10 bars on the graph.

upperErrors
const(double)[] upperErrors()

Static functions

opCall
BarPlot opCall(R1 centers, R2 heights, double width)

Create a BarPlot. centers and heights must be input ranges with elements implicitly convertible to double. width determines the width of each bar relative to the X-axis scale and must be greater than 0.

opCall
BarPlot opCall(R1 centers, R2 heights, double width, R3 lowerErrors, R4 upperErrors)

Create a BarPlot with error bars. lowerErrors and upperErrors must be input ranges with elements implicitly convertible to double for error bars to be shown. Any other value, such as null or 0, will result in no error bars being shown. Therefore, to only show, for example, upper erros, simply pass in null or 0 for the lower errors.

Variables

_barColor
Color _barColor;
Undocumented in source.
width
double width;

Inherited Members

From Plot

upperLim
double upperLim;
Undocumented in source.
lowerLim
double lowerLim;
Undocumented in source.
leftLim
double leftLim;
Undocumented in source.
rightLim
double rightLim;
Undocumented in source.
_legendText
string _legendText;
Undocumented in source.
resetLimits
void resetLimits(Figure figure)
Undocumented in source. Be warned that the author may not have intended to support it.
measureLegend
PlotSize measureLegend(Font legendFont, FigureBase fig)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLegendSymbol
void drawLegendSymbol(FigureBase fig, PlotRect where)
Undocumented in source.
drawPlot
void drawPlot(Figure , double , double , double , double )
Undocumented in source.
hasLegend
bool hasLegend()

Returns true if this plot type supports legends, otherwise false.

toFigure
Figure toFigure()

Convenience method that instantiates a Figure object with this plot. Useful for creating single-plot figures w/o a lot of boilerplate.

toLabeledFigure
Figure toLabeledFigure()

Instantiates a Figure object with this plot and also places the default axes and tick labeling and title for the plot type, if any, on the Figure. If a plot type has no default labeling, simply forwards to toFigure().

leftMost
double leftMost()

The leftmost point on the plot.

rightMost
double rightMost()

The rightmost point on the plot.

topMost
double topMost()

The topmost point on the plot.

bottomMost
double bottomMost()

The bottommost point on the plot.

legendText
string legendText()
legendText
This legendText(string newText)

Meta