这个情节是 gnuplot 的典型情节吗?
Is this plot typical of gnuplot?
我看了一下 https://stats.stackexchange.com/tags/data-visualization/info,在我看来,也许我可以在这里找到答案...或者这里也可能是题外话。
这个图是 gnuplot 的典型图吗?
默认情况下,字体通常看起来不同,轴标题居中。
这不是 gnuplot
的 默认 外观。
但是 gnuplot 是非常可定制的,外观取决于所使用的输出设备 (terminal
) 的能力和构建它的库。
拥有自己的 ~/.gnuplot
或站点范围内的 /usr/local/share/gnuplot/<version>/gnuplotrc
并不少见。
来自内置帮助:
When gnuplot is run, it first looks for a system-wide initialization file
gnuplotrc
. The location of this file is determined when the program is built
and is reported by show loadpath
. The program then looks in the user's HOME
directory for a file called .gnuplot
on Unix-like systems or GNUPLOT.INI
on
other systems. (OS/2 will look for it in the directory named in
the environment variable GNUPLOT
; Windows will use APPDATA
).
除非你是必须遵循你所在机构的风格指南的学生,否则我鼓励你根据你可以在网上找到的例子和你的需要来开发你自己的风格。
gnuplotting.org 上提供的信息和示例对此非常有价值。
与 一样,gnuplot
是非常可定制的。
为了帮助您了解它的可定制性,请参阅下面的完整示例,该示例重现了想要的情节。
reset
set encoding utf8
# ***** TERMINAL SETTINGS *****
set terminal wxt size 800,450 font "Consolas"
# ***** GENERAL SETTINGS *****
# tics, key, and border
set tics nomirror scale 1.5
unset key
set border 7
# linestyles
set style line 1 lc "black"
set style line 2 lc "red"
# margins
set lmargin screen 0.100
set rmargin screen 0.900
set bmargin screen 0.135
# xlabel, xrange, and (m)xtics
set xlabel "Time [sec]"
set xrange [0:2.2]
set xtics 0.2 tc ls 1
set mxtics 4
# ***** CREATING SOME DATA TO PLOT *****
# Gaussian function plus some noise
f(x,a,b,c) = a*exp(-(x-b)**2/(2*c**2)) + a*0.02*rand(0)
# Storing on datablock
# First one
set table $FlowData
plot f(x, 80.0, 0.25, 0.15)
unset table
# Second one
set table $PressureData
plot f(x, 35.0, 0.75, 0.20)
unset table
# ***** THE PLOTS *****
# Turning-on the multiplot mode to place both plots
set multiplot
# ***** FIRST PLOT SETTINGS *****
set ylabel "Flow [l/min]"
set yrange [-10:120]
set mytics 4
# Fist plot itself
plot $FlowData axes x1y1 w l ls 1 lw 2
# ***** SECOND PLOT SETTINGS *****
# Remove previous customizations
unset tics
unset xlabel
unset ytics
unset ylabel
# New customizations
set border 8 ls 2
set y2label "Pressure [mbar]" tc ls 2
set y2range [-5:60]
set y2tics tc ls 2
set my2tics 4
# Labels
set label "Compliance : 15 [ml/mbar]" at 0.95,100.0 offset 0, 0
set label "Resistance : 5 [mbar/l/sec]" at 0.95,100.0 offset 0,-1
set label "PEEP : 5 [mbar]" at 0.95,100.0 offset 0,-2
set label "Inspiratory Pressure : 30 [mbar]" at 0.95,100.0 offset 0,-3
# Second plot itself
plot $PressureData axes x1y2 w l ls 2 lw 2
unset multiplot
结果:
我看了一下 https://stats.stackexchange.com/tags/data-visualization/info,在我看来,也许我可以在这里找到答案...或者这里也可能是题外话。
这个图是 gnuplot 的典型图吗?
默认情况下,字体通常看起来不同,轴标题居中。
这不是 gnuplot
的 默认 外观。
但是 gnuplot 是非常可定制的,外观取决于所使用的输出设备 (terminal
) 的能力和构建它的库。
拥有自己的 ~/.gnuplot
或站点范围内的 /usr/local/share/gnuplot/<version>/gnuplotrc
并不少见。
来自内置帮助:
When gnuplot is run, it first looks for a system-wide initialization file
gnuplotrc
. The location of this file is determined when the program is built and is reported byshow loadpath
. The program then looks in the user's HOME directory for a file called.gnuplot
on Unix-like systems orGNUPLOT.INI
on other systems. (OS/2 will look for it in the directory named in the environment variableGNUPLOT
; Windows will useAPPDATA
).
除非你是必须遵循你所在机构的风格指南的学生,否则我鼓励你根据你可以在网上找到的例子和你的需要来开发你自己的风格。
gnuplotting.org 上提供的信息和示例对此非常有价值。
与gnuplot
是非常可定制的。
为了帮助您了解它的可定制性,请参阅下面的完整示例,该示例重现了想要的情节。
reset
set encoding utf8
# ***** TERMINAL SETTINGS *****
set terminal wxt size 800,450 font "Consolas"
# ***** GENERAL SETTINGS *****
# tics, key, and border
set tics nomirror scale 1.5
unset key
set border 7
# linestyles
set style line 1 lc "black"
set style line 2 lc "red"
# margins
set lmargin screen 0.100
set rmargin screen 0.900
set bmargin screen 0.135
# xlabel, xrange, and (m)xtics
set xlabel "Time [sec]"
set xrange [0:2.2]
set xtics 0.2 tc ls 1
set mxtics 4
# ***** CREATING SOME DATA TO PLOT *****
# Gaussian function plus some noise
f(x,a,b,c) = a*exp(-(x-b)**2/(2*c**2)) + a*0.02*rand(0)
# Storing on datablock
# First one
set table $FlowData
plot f(x, 80.0, 0.25, 0.15)
unset table
# Second one
set table $PressureData
plot f(x, 35.0, 0.75, 0.20)
unset table
# ***** THE PLOTS *****
# Turning-on the multiplot mode to place both plots
set multiplot
# ***** FIRST PLOT SETTINGS *****
set ylabel "Flow [l/min]"
set yrange [-10:120]
set mytics 4
# Fist plot itself
plot $FlowData axes x1y1 w l ls 1 lw 2
# ***** SECOND PLOT SETTINGS *****
# Remove previous customizations
unset tics
unset xlabel
unset ytics
unset ylabel
# New customizations
set border 8 ls 2
set y2label "Pressure [mbar]" tc ls 2
set y2range [-5:60]
set y2tics tc ls 2
set my2tics 4
# Labels
set label "Compliance : 15 [ml/mbar]" at 0.95,100.0 offset 0, 0
set label "Resistance : 5 [mbar/l/sec]" at 0.95,100.0 offset 0,-1
set label "PEEP : 5 [mbar]" at 0.95,100.0 offset 0,-2
set label "Inspiratory Pressure : 30 [mbar]" at 0.95,100.0 offset 0,-3
# Second plot itself
plot $PressureData axes x1y2 w l ls 2 lw 2
unset multiplot
结果: