gnuplot 2つの数値をプロット
#! /bin/tcsh -f
################################################
#plot_axcel1
################################################
read_file=output_axcelrv.dat
plot_file1=axcel_pmin
plot_file2=axcel_avcwc
plot_file3=axcel_vmax
plot_file11=axcel_pmin_avcwc
gnuplot <<EOF
################################################
################################################
plot "${read_file}" using 1:2 with line title "${plot_file1}" linetype 3 linecolor rgbcolor "red" linewidth 3
set title "${plot_file1}"
set xlabel "time step [h]"
set ylabel "[hPa]"
set term postscript
set output "${plot_file1}.ps"
replot
################################################
plot "${read_file}" using 1:6 with line title "${plot_file2}" linetype 3 linecolor rgbcolor "blue" linewidth 3
set title "${plot_file2}"
set xlabel "time step [h]"
set ylabel "[g/m2]"
set term postscript
set output "${plot_file2}.ps"
replot
################################################
plot "${read_file}" using 1:5 with line title "${plot_file3}" linetype 3 linecolor rgbcolor "green" linewidth 3
set title "${plot_file3}"
set xlabel "time step [h]"
set ylabel "[m/s]"
set term postscript
set output "${plot_file3}.ps"
replot
################################################
### double plot#################################
################################################
set yrange [980:1010]
set y2range [0:30]
plot "${read_file}" using 1:2 axis x1y1 with line title "${plot_file1}" linetype 3 linecolor rgbcolor "red" linewidth 3,\
"${read_file}" using 1:5 axis x1y2 with line title "${plot_file3}" linetype 3 linecolor rgbcolor "green" linewidth 3
set xlabel "time step [h]"
set ylabel "[hPa]"
set y2label "[m/s]"
set term postscript
set output "${plot_file11}.ps"
replot
################################################
EOF
################################################
################################################
################################################
################################################
################################################
### make pdf ###################################
################################################
################################################
################################################
################################################
################################################
ps2pdf ${plot_file1}.ps 1_${plot_file1}.pdf
rm ${plot_file1}.ps
ps2pdf ${plot_file2}.ps 2_${plot_file2}.pdf
rm ${plot_file2}.ps
ps2pdf ${plot_file3}.ps 3_${plot_file3}.pdf
rm ${plot_file3}.ps
ps2pdf ${plot_file11}.ps 11_${plot_file11}.pdf
rm ${plot_file11}.ps
0 件のコメント:
コメントを投稿