Chapter 1. Plotting Curves, Boxes, Points, and more

This chapter contains the following recipes:

  • Plotting a function
  • Plotting multiple curves
  • Using two different y-axes
  • Making a scatterplot
  • Plotting boxes
  • Plotting circles
  • Drawing filled curves
  • Handling financial data
  • Making a basic histogram plot
  • Stacking histograms
  • Plotting multiple histograms
  • Dealing with errors
  • Making a statistical whisker plot
  • Making an impulse plot
  • Graphing parametric curves
  • Plotting with polar coordinates

Introduction

We begin the book with a set of recipes that cover gnuplot's one-dimensional graph styles. A 1D graph refers to the plotting of data or mathematical functions where the values plotted depend on a single variable. Examples are simple mathematical functions, such as y = sin(x), or 1D data, such as the temperature in a particular location versus time. The plotting of quantities that depend on two variables is covered starting in Chapter 8, The Third Dimension, where we show how to make surface, contour, and image plots.

Gnuplot can create a vast array of 1D plot types in a large number of styles. The recipes in this chapter survey all of the major types of 1D graph, with an example that can be run immediately to produce the result in the illustration. For each example, we have provided enough explanation in the There's more... section for you to extend and adapt the recipe for your particular problem. We assume that you have gnuplot up and running and are able to create plots on one of the terminals; the recipes in this chapter work on every terminal or output file type.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.249.174