This section contains information about other elements which can be part of a plot.
PHPlot can draw three types of titles:
The main plot title, which is centered at the top of the image. This is typically used to identify the plot as a whole.
The X title, which is drawn horizontally and can appear below the plot, above the plot, or in both places. This is typically used to identify the values along the X axis.
The Y title, which is drawn vertically and can appear to the left of the plot, to the right of the plot, or on both sides. This is typically used to identify the values along the Y axis.
For a list of functions used to control titles, see Section 4.7, “Titles”.
Here is a sample plot with the titles called out.
PHPlot can draw a legend on the plot. This is normally used with multiple data sets, to identify the data sets by color. A legend can also be used with pie charts to identify the sections. For a list of functions used to control the legend, see Section 4.8, “Legend”.
Here is a sample plot with the legend called out.
PHPlot can draw horizontal (Y) and/or vertical (X) grid lines on a plot. You can independently enable the horizontal (Y) and vertical (X) lines in the grid, and use dashed or solid lines. For a list of functions used to control the grid, see Section 4.10, “Grid Controls”.
Here is a sample plot with the X Grid and Y Grid called out.
Tick marks are drawn by default along the bottom edge of the plot (X tick marks) and the left side of the plot (Y tick marks). These usually, but not always, correspond to the X and Y axis lines. You can set the tick interval or control the number of ticks, suppress the first or last tick on an axis, and control the tick mark size. For a list of functions used to control tick marks, see Section 4.12, “Ticks”.
Left to its own, PHPlot will determine tick values for X and Y axes, but it currently isn't too smart about choosing values and you may not be happy with the results. You can use PHPlot functions to set the desired tick interval or number of ticks, but you will most likely also have to call SetPlotAreaWorld to set the X and/or Y data range limits. Otherwise, you get the tick intervals you want, but the actual values will depend on a somewhat arbitrary base value.