O'Reilly logo

gnuplot Cookbook by Lee Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coloring your curves

The following figure is a simple graph of different powers of x, color-coded. The colors, which can be seen in the electronic version of the graph, appear here as different shades of gray:

Coloring your curves

How to do it…

To produce the previous figure, enter the following sequence of commands at the gnuplot interactive prompt. Alternatively, save them in a file and use the command gnuplot --persist <file>, substituting your filename for<file>. The --persist flag tells gnuplot to keep the plot window open after executing the script. (This script, as well as all the others, are provided with this book as a file named after the recipe.)

set term ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required