'eps' terminal
set terminal postscript eps font "Arial-narrow" 12 set output "fig_gpl_PSHD.eps"
Add 'enhanced' and 'color' modes to 'eps' terminal
set terminal postscript eps enhanced color font "Arial" 10 set output "fig_gpl_climate.eps"
'png' terminal
set terminal png set output "fig_png_line1.png"
Read the 'csv' data
- In the case of default, the data separator is blank (space).
- The data separator is changed to ',' from blank using following command.
- If following command is executed, this is adopted to plot data under the use of "-".
set datafile separator ","
Sample setting for time-sequence diagram
- set xdata time
- Declare that x-axis means time-series.
- set timefmt "%Y/%m/%d"
- Declare that the input format of time-series is 'year/month/date.'
- set format x "%b-%Y"
- Set the format of Tic-mark label of x-axis to month of abbreviated name - year.
- set format y "%.0f"
- Set the format of Tic-mark label of y-axis in integer.
- set xtics offset 0,-4.0 rotate by 90
- Tic-mark label of x-axis is lowered by 4-unit and rotated by 90 degree.
- set xlabel "Date" offset 0,-1.5
- The location of x-axis label is lowered by 1.5 unit because of rotation of x-axis Tic-mark label.
- xrange ["1999/01/01":"2009/12/31"]
- Set the range of x-axis using the format specified by 'timefmt.'
set xdata time set timefmt "%Y/%m/%d" set format x "%b-%Y" set format y "%.0f" set xtics offset 0,-4.0 rotate by 90 set ytics set xlabel "Date" offset 0,-1.5 set ylabel "Temperature ({/Symbol \260}C)" set xrange ["1999/01/01":"2009/12/31"] set yrange [-50:50]
Sample setting for explanatory drawing
- This is a sample for an explanatory drawing.
- Set the ratio of horizontal and vertical axis to 1:1 using 'set size ratio -1'
- Specify the range of x-axis and y-axis using 'xrange' and 'yrange'
- Don't draw border line, axis lines and grid lines
set size ratio -1 set xrange [-10:130] set yrange [-30:40] set border 0 set xtics 0,0,0 set ytics 0,0,0 set xtics nomirror set ytics nomirror
Control the aspect ratio
Set the length of y-axis as 0.7 times length of x-axis
set size ratio 0.7
set the length of x-axis and y-axis to 1:1
set size ratio -1
Don't draw the Tic-mark label of x-axis
set format x ""
Draw the Tic-mark label of x-axis with date-month (abbreviated name)
set format x "%d-%b"
Draw the Tic-mark label of y-axis in integer
set format y "%.0f"
Change the location of the graph title
- In the case of default, graph title is drawn at upper location of the graph area.
- By using following command, the location of graph title can be changed to lower location of the graph area.
- First, get the margin at lower location of graph area using 'bmargin'
- next, lower the location of the graph title by 41-unit using 'offset'
set bmargin 6 set title "Fig. Change of scale of Penstock in Japan" offset 0,-41 font "Arial-Bold,16"