Home Demos

A demonstration of a bar chart plotted along the vertical axis

This example demonstrates how to change the roles of the horizontal and vertical axes, so functions are plotted along a vertical axis rather than a horizontal axis.

The roles of the axes are configured separately for each data set, so it is possible to plot one function in the form y=f(x) and another function in the form x=g(y).

This is configured using the axis1 and axis2 settings on each data set, which configure the name of the axes which should take the role of abscissa (usually x) and ordinate (usually y) axes. Allowed options are x1 (bottom), x2 (top), y1 (left) and y2 (right). On three-dimensional graphs, z1 and z2 are also valid options.

Source code for this page



        

Follow