Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Tutorial: 1D Special Features

X Axis Grid Lines
X Axis External Style

X Axis Grid Lines

If you would like grid lines that go across the graph, you can make the following call to svg_1d_plot:

my_plot.x_major_grid_on(true)
       .x_minor_grid_on(true);

To style it, you would use the following calls:

my_plot.x_major_grid_color(lightgray)
       .x_minor_grid_color(whitesmoke);

This will produce something like the following image:

1d_x_grid

X Axis External Style

For an alternate way to display a regular axis, you can use an external style:

my_plot.x_external_style_on(true);

The axis is still styled using the normal methods. The following is an example of the style that you can produce with this.

1d_x_external

[Important] Important

If the axis is turned off, x_external_style_on(true) will not turn the axis back on. To do that, you must call axis_on(true)

Copyright © 2007 Jake Voytko

PrevUpHomeNext