Legends and color bars
Prev | Chapter 3. Advanced Use of PLplot | Next

## Legends and color bars

The `pllegend` and `plcolorbar` routines are available in PLplot to provide users with the capability of visually annotating their plots with a legend (a series of patterned boxes, lines, or symbols with associated explanatory UTF-8 text) or a color bar (an annotated subplot representing a continuous range of colors within the main plot and typically identifying certain colors with certain numerical values using an axis). `pllegend` is useful for visually annotating most two-dimensional plots. See our standard examples 04 and26 for some examples. `plcolorbar` is especially useful for annotating continuous shade plots generated by `plshades`. See our standard example 16, for an example.

The `pllegend` and `plcolorbar` routines provide the users complete and convenient control of the size and position of the results on the plot and also return size data that makes it straightforward to stack different legend or colorbar results together on the plot (see our standard example 33 for an example of this capability). Furthermore, the `pllegend` and `plcolorbar` routines provide the user with many different style possibilities for the results. Because of all these features, `pllegend` and `plcolorbar` have an extensive argument list. So we recommend first-time users of `pllegend` and `plcolorbar` use our standard examples 04, 16, and 26 as a tutorial on how to use these PLplot capabilities in a simple way, and for more advanced use we recommend studying the `pllegend` and `plcolorbar` documentation and also our standard example 33 which attempts to exercise most capabilities of these two PLplot functions.

Prev | Up | Next
Three-dimensional Plots | Home | Chapter 4. Deploying programs that use PLplot