Outline:
Range
Border
Zero axes
Key
Tics
Major tics
Minor tics
Nomirror and second tics
Other options for tics
Grid
Want only the plot?
Title, key title, and lable
Title
Key title
Label
Arrow
Resolution
3D Plot general
Scaling
Size ratio
Tics level
Log scale
Parameterizing
Parametric
Polar
Border
Zero axes
Key
Tics
Major tics
Minor tics
Nomirror and second tics
Other options for tics
Grid
Want only the plot?
Title, key title, and lable
Title
Key title
Label
Arrow
Resolution
3D Plot general
Scaling
Size ratio
Tics level
Log scale
Parameterizing
Parametric
Polar
Data plot
Basics
Vector
Bar graph
Line and point styles
Multiple columns data plot
Multiplot
For CSV files
For Fortran high precision data
Error bars
Candle chart
3D data plot
Other tips
Define a function
Plot with complex variables
Tertiary operator
Skip data values
Gnuplot as a calculator
Timestamp
Data fitting
Basics
Vector
Bar graph
Line and point styles
Multiple columns data plot
Multiplot
For CSV files
For Fortran high precision data
Error bars
Candle chart
3D data plot
Other tips
Define a function
Plot with complex variables
Tertiary operator
Skip data values
Gnuplot as a calculator
Timestamp
Data fitting
Key
"Key" is the label of a data file (or a function) plotted. It appears in right-top in the display. In order to erase it, type simply
gnuplot> unset key
Compare this with the previous plot. You can see that the key has been removed.
You can also change the location of keys. You can select the following options with "set key" command:
gnuplot> set key left
gnuplot> set key center
gnuplot> set key right
gnuplot> set key top
gnuplot> set key bottom
gnuplot> set key outside
gnuplot> set key inside
gnuplot> set key above
gnuplot> set key below
You can also combine a few of them. For example,
gnuplot> set key center
gnuplot> set key right
gnuplot> set key top
gnuplot> set key bottom
gnuplot> set key outside
gnuplot> set key inside
gnuplot> set key above
gnuplot> set key below
gnuplot> set key left top outside
gnuplot> plot tan(x)
gnuplot> plot tan(x)
If you need to change the name of key, enter "title" command and the name will be replaced.
gnuplot> set key bottom
gnuplot> plot [0:5] log(x) title 'Log of x'
You will see "Log of x" instead of "log(x)" for the key.
Note that multiple commands for one function or data file does not need commas to separate commands.
When you plot multiple functions or data, you need to use commas for each plot.
gnuplot> plot [0:5] log(x) title 'Log of x'
If there are multiple keys to display, you may need a spacing between them because it may look crowded. The command, "set key spacing" can be used to solve this issue. The default spacing is 1. If you set like 0.5, the keys will be overlapped each other. Let's have an example to compare.
gnuplot> set key spacing 2
gnuplot> plot [-2:2] sinh(x),cosh(x)
gnuplot> plot [-2:2] sinh(x),cosh(x)
Previous page | Next page |