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


3D Plot General

For 3D plots, the functions generally consist of both x and y. The command must be "splot" instead of "plot." You may need to set options for z axis, such as range, zeroaxis, etc. The way you set is exactly the same as x- and y-axes. The simplest command line is as follows:
gnuplot> splot sin(x)*cos(y)
gnuplot hirophysics
As default, the surface of plot is transparent. It looks like a wired object. If you do not want to show the hidden area of a 3D plot, command as follows:
gnuplot> set hidden3d
gnuplot> splot sin(x)*cos(y)
Note that the picture below uses isosamples 50.
gnuplot hirophysics
One of the fancy features is called "pm3d." This is a palette-mapped style of 3D and 4D data. You can grasp the height and depth of the surface in terms of the colors.
gnuplot> set pm3d
gnuplot> splot [0:2*pi] [0:2*pi] sin(x)*cos(y)
gnuplot hirophysics
The position of the colored map can be chosen. The default is on surface of the plot. The option takes three positions, which are bottom, surface, and top. The command should be abbreviated like "set pm3d at s." You are allowed to use only b, s, and t as bottom, surface, and top.
gnuplot> set pm3d at b
gnuplot> splot [0:2*pi] [0:2*pi] sin(x)*cos(y)
gnuplot hirophysics
They can also be combined as follows:
gnuplot> set pm3d at bs
gnuplot> splot [0:2*pi] [0:2*pi] sin(x)*cos(y)
gnuplot hirophysics
For the 2D-segment of pm3d on the x-y plane, use the following
gnuplot> set pm3d map
gnuplot> splot [0:2*pi] [0:2*pi] sin(x)*cos(y)
gnuplot hirophysics
In order to have the normal contour map of a 3D plot, use following:
gnuplot> set contour
gnuplot> splot sin(sqrt(x**2+y**2))
gnuplot hirophysics
(The above plot also requires "set isosamples 50" and "set hidden3d.") In order to increase the number of contour lines, use "set cntrparam":
gnuplot> set cntrparam levels 10
gnuplot> splot sin(sqrt(x**2+y**2))
gnuplot hirophysics
To specify the values of contour lines, do following:
gnuplot> set cntrparam levels discrete -0.8,-0.5,0,0.5,0.8
gnuplot> splot sin(sqrt(x**2+y**2))
gnuplot hirophysics
Note that you have to "set contour map" when you use "set cntrparam."
Previous page Next page