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.

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.

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

width
double width;

Inherited Members

From Plot

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