Chapter 2. Annotating with Labels and Legends

This chapter contains the following recipes:

  • Labeling the axes
  • Setting the label size
  • Adding a legend
  • Putting a box around the legend
  • Adding a label with an arrow
  • Using Unicode characters [new]
  • Putting equations in your labels

Introduction

The graphs we created in the previous chapter served the purpose of illustrating the various 2D plot styles, but they were all missing a few things. For a graph to be useful in the real world, it must be endowed with a title and various labels that explain what it is about and how to interpret its assorted plot elements.

In this chapter, we revisit the 2D graph, creating one with a few curves, two different y-axes, and shaded areas, and in each recipe, we add an additional ...

Get gnuplot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.