gnuplot,蜘蛛图中边距的问题
我正在尝试使用来自多个文件的数据创建蜘蛛图。除了边缘和情节标题位置外,一切都按顺序(轴,值等)进行顺序(轴,值等)。
使用中的脚本和结果映像follo:
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"
显然,该图显然是白色的太多。侧面的空间。此外,标题出现在轴标签的顶部,而另一个轴标签位于图外。 典型的保证金命令(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_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_conv_conv_optimal_soptol_sopente_isopente_isopent_isopent_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
。
#(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 Patchlevel 3。 先感谢您。
通过遵循神学和伊桑的建议解决了这个问题。终端已更改为QT,标题和标签被偏移,并使用SET Margins命令定义了边距。由于某种原因,设置tmargin/bmargin/lmargin/rmargin不起作用。
I am trying to create a spider plot using data from several files. Everything is in order (axes, values etc) with the exception of the margins and plot title position.
The script in use and the resulting image follo:
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"
Evidently, the plot appears with too much white space on the sides. Additionally the title appears right on top of an axis label, while another axis label lies outside the plot.
The typical margin commands (tmargin,bmargin,lmargin,rmargin) do not appear to work.
Any ideas?
These are the data files:
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
Removing the size ratio command slightly alters the dimensions. The problem however persists. Terminal wxt is a disaster, while with terminal qt the result is similar.
I am using 5.4 Patchlevel 3 on Windows 10 64-bit.
Thank you in advance.
The issue was resolved by following the suggestions of both theozh and Ethan. The terminal was changed to qt, the title and labels were offset and the margins were defined using the set margins command. For some reason set tmargin/bmargin/lmargin/rmargin did not work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为,在图周围获得更多空间的最简单方法是
设置边距
,并调整了特定值。我不能完全复制您的情节,但是我遇到的最大问题是将钥匙放置,以使其与绘图内容不重叠。我通过添加以产生以下图来修改您的脚本。显然,水平轴标签的位置也可以改善。您可以使用,例如
I think the simplest way to get more space around the plot is
set margins
with specific values adjusted to taste. I can't exactly reproduce your plot, but the biggest issue I have is positioning the key so that it doesn't overlap with the plot content. I modified your script by addingto produce the figure below. Obviously the horizontal axis label placement could be improved also. You could use, e.g.