gnuplot,蜘蛛图中的边距问题
gnuplot, problem with margins in spiderplot
我正在尝试使用来自多个文件的数据创建蛛网图。除边距和绘图标题位置外,一切都井井有条(轴、值等)。
正在使用的脚本和生成的图像如下:
set title "Optimal solutions for the subcritical conventional cycle"
set termopt enhanced
set encoding utf8
set terminal windows
set size ratio -1
set spiderplot
#set grid spiderplot
set style spiderplot fs transparent solid 0.2 border lw 1.5 pt 7 ps 1.5
set paxis 1 range[100:275]
set paxis 2 range[0:10]
set paxis 3 range[0:25]
set paxis 4 range[0:25]
set paxis 1 label "T_{evap} [^{o}C]"
set paxis 2 label " ΔT_{super} [^{o}C]"
set paxis 3 label "ΔT_{pp,evap} [^{o}C]"
set paxis 4 label "ΔT_{pp,cond} [^{o}C] "
set paxis 1 tics 100,25,275
set paxis 2 tics 0,1,10
set paxis 3 tics 0,5,25
set paxis 4 tics 0,5,25
plot \
keyentry with spiderplot lc "#E74C3C" lw 1.5 title "R124",\
for [i=1:4] "optsub_conv_optimal_solution_R124.txt" using i notitle lw 1.5 lc "#E74C3C",\
newspiderplot,\
keyentry with spiderplot lc "#F39C12" lw 1.5 title "Isobutane",\
for [i=1:4] "optsub_conv_optimal_solution_Isobutane.txt" using i notitle lw 1.5 lc "#F39C12",\
newspiderplot,\
keyentry with spiderplot lc "#2ECC71" lw 1.5 title "R245fa",\
for [i=1:4] "optsub_conv_optimal_solution_R245fa.txt" using i notitle lw 1.5 lc "#2ECC71",\
newspiderplot,\
keyentry with spiderplot lc "#3498DB" lw 1.5 title "Isopentane",\
for [i=1:4] "optsub_conv_optimal_solution_Isopentane.txt" using i notitle lw 1.5 lc "#3498DB",\
newspiderplot,\
keyentry with spiderplot lc "#9B59B6" lw 1.5 title "Cyclopentane",\
for [i=1:4] "optsub_conv_optimal_solution_Cyclopentane.txt" using i notitle lw 1.5 lc "#9B59B6"
spiderplot
显然,该图的两侧出现了太多的白色 space。此外,标题出现在轴标签的正上方,而另一个轴标签位于图的外部。
典型的边距命令(tmargin、bmargin、lmargin、rmargin)似乎不起作用。
有什么想法吗?
这些是数据文件:
optsub_conv_optimal_solution_R124.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
109.741738 9.911802 13.686376 10.490225 0.079108 0.777738 11901.389154 4.667989 0.874848 0.067637 0.942485 0.077313 0.150392 73.898046 1.431867 53.509008 4.618337 2.153230 2.338824
optsub_conv_optimal_solution_Isobutane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
129.026974 9.784578 10.589184 7.690567 0.097319 0.802556 36554.377923 1.519806 0.857547 0.083208 0.940755 0.097030 0.170107 71.949670 1.155533 59.034857 3.158823 2.010785 2.219941
optsub_conv_optimal_solution_R245fa.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
148.519152 9.253894 16.742495 5.918559 0.117315 0.819801 26564.547418 2.091342 0.838550 0.100305 0.938855 0.119617 0.190727 76.298702 0.974274 60.864612 2.447578 1.892059 2.023517
optsub_conv_optimal_solution_Isopentane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
178.491873 8.061367 17.725536 5.478487 0.136583 0.843387 68534.805634 0.810618 0.820246 0.116779 0.937025 0.142370 0.209648 78.618217 0.844249 67.467127 1.770176 1.957984 1.699375
optsub_conv_optimal_solution_Cyclopentane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
227.881346 6.390844 21.097316 5.927053 0.183182 0.871473 106815.328762 0.520108 0.775977 0.156620 0.932598 0.201836 0.251947 90.943453 0.660987 63.128907 1.374341 2.673516 1.218769
删除尺寸比例命令会稍微改变尺寸。但是问题仍然存在。终端 wxt 是一场灾难,而终端 qt 的结果是相似的。
我在 Windows 10 64 位上使用 5.4 补丁级别 3。
提前谢谢你。
按照 theozh 和 Ethan 的建议解决了这个问题。终端更改为 qt,标题和标签被偏移,边距使用 set margins 命令定义。由于某种原因,设置 tmargin/bmargin/lmargin/rmargin 无效。
我认为获得更多 space 情节的最简单方法是 set margins
根据口味调整特定值。我不能完全重现你的情节,但我遇到的最大问题是定位键,使其不与情节内容重叠。我通过添加
修改了你的脚本
set margins 4,4,4,4
set key at graph 0.75, 1.00 top left
生成下图。显然,水平轴标签放置也可以改进。您可以使用,例如
set paxis 2 label offset 4
我正在尝试使用来自多个文件的数据创建蛛网图。除边距和绘图标题位置外,一切都井井有条(轴、值等)。
正在使用的脚本和生成的图像如下:
set title "Optimal solutions for the subcritical conventional cycle"
set termopt enhanced
set encoding utf8
set terminal windows
set size ratio -1
set spiderplot
#set grid spiderplot
set style spiderplot fs transparent solid 0.2 border lw 1.5 pt 7 ps 1.5
set paxis 1 range[100:275]
set paxis 2 range[0:10]
set paxis 3 range[0:25]
set paxis 4 range[0:25]
set paxis 1 label "T_{evap} [^{o}C]"
set paxis 2 label " ΔT_{super} [^{o}C]"
set paxis 3 label "ΔT_{pp,evap} [^{o}C]"
set paxis 4 label "ΔT_{pp,cond} [^{o}C] "
set paxis 1 tics 100,25,275
set paxis 2 tics 0,1,10
set paxis 3 tics 0,5,25
set paxis 4 tics 0,5,25
plot \
keyentry with spiderplot lc "#E74C3C" lw 1.5 title "R124",\
for [i=1:4] "optsub_conv_optimal_solution_R124.txt" using i notitle lw 1.5 lc "#E74C3C",\
newspiderplot,\
keyentry with spiderplot lc "#F39C12" lw 1.5 title "Isobutane",\
for [i=1:4] "optsub_conv_optimal_solution_Isobutane.txt" using i notitle lw 1.5 lc "#F39C12",\
newspiderplot,\
keyentry with spiderplot lc "#2ECC71" lw 1.5 title "R245fa",\
for [i=1:4] "optsub_conv_optimal_solution_R245fa.txt" using i notitle lw 1.5 lc "#2ECC71",\
newspiderplot,\
keyentry with spiderplot lc "#3498DB" lw 1.5 title "Isopentane",\
for [i=1:4] "optsub_conv_optimal_solution_Isopentane.txt" using i notitle lw 1.5 lc "#3498DB",\
newspiderplot,\
keyentry with spiderplot lc "#9B59B6" lw 1.5 title "Cyclopentane",\
for [i=1:4] "optsub_conv_optimal_solution_Cyclopentane.txt" using i notitle lw 1.5 lc "#9B59B6"
spiderplot
显然,该图的两侧出现了太多的白色 space。此外,标题出现在轴标签的正上方,而另一个轴标签位于图的外部。 典型的边距命令(tmargin、bmargin、lmargin、rmargin)似乎不起作用。 有什么想法吗?
这些是数据文件: optsub_conv_optimal_solution_R124.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
109.741738 9.911802 13.686376 10.490225 0.079108 0.777738 11901.389154 4.667989 0.874848 0.067637 0.942485 0.077313 0.150392 73.898046 1.431867 53.509008 4.618337 2.153230 2.338824
optsub_conv_optimal_solution_Isobutane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
129.026974 9.784578 10.589184 7.690567 0.097319 0.802556 36554.377923 1.519806 0.857547 0.083208 0.940755 0.097030 0.170107 71.949670 1.155533 59.034857 3.158823 2.010785 2.219941
optsub_conv_optimal_solution_R245fa.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
148.519152 9.253894 16.742495 5.918559 0.117315 0.819801 26564.547418 2.091342 0.838550 0.100305 0.938855 0.119617 0.190727 76.298702 0.974274 60.864612 2.447578 1.892059 2.023517
optsub_conv_optimal_solution_Isopentane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
178.491873 8.061367 17.725536 5.478487 0.136583 0.843387 68534.805634 0.810618 0.820246 0.116779 0.937025 0.142370 0.209648 78.618217 0.844249 67.467127 1.770176 1.957984 1.699375
optsub_conv_optimal_solution_Cyclopentane.txt
#(1) Tevap [oC] (2) DTsuper [oC] (3) DTppevap [oC] (4) DTppcond [oC] (5) nth [-] (6) nex [-] (7) wnet [kJ/kg] (8) mwf [kg/s] (9) nthchp [-] (10) nelchp [-] (11) nchp [-] (12) PHR [-] (13) PESR [-] (14) Toout [oC] (15) mo [kg/s] (16) Twoout [oC] (17) mw [kg/s] (18) Aevap [m^2] (19) Acond [m^2]
227.881346 6.390844 21.097316 5.927053 0.183182 0.871473 106815.328762 0.520108 0.775977 0.156620 0.932598 0.201836 0.251947 90.943453 0.660987 63.128907 1.374341 2.673516 1.218769
删除尺寸比例命令会稍微改变尺寸。但是问题仍然存在。终端 wxt 是一场灾难,而终端 qt 的结果是相似的。
我在 Windows 10 64 位上使用 5.4 补丁级别 3。 提前谢谢你。
按照 theozh 和 Ethan 的建议解决了这个问题。终端更改为 qt,标题和标签被偏移,边距使用 set margins 命令定义。由于某种原因,设置 tmargin/bmargin/lmargin/rmargin 无效。
我认为获得更多 space 情节的最简单方法是 set margins
根据口味调整特定值。我不能完全重现你的情节,但我遇到的最大问题是定位键,使其不与情节内容重叠。我通过添加
set margins 4,4,4,4
set key at graph 0.75, 1.00 top left
生成下图。显然,水平轴标签放置也可以改进。您可以使用,例如
set paxis 2 label offset 4