我有这些数据:
-22.42778 20.55840 -4.3E+0015
-22.41731 20.58783 -4.3E+0015
-22.40206 20.59463 -4.3E+0015
-22.39814 20.57130 -4.3E+0015
-22.39906 20.53965 -4.3E+0015
-22.39983 20.50836 -4.3E+0015
-22.40005 20.47765 -4.3E+0015
-22.40005 20.44699 -4.3E+0015
-22.40008 20.41630 -4.3E+0015
-22.40027 20.38591 -4.3E+0015
-22.40069 20.35632 -4.3E+0015
-22.40138 20.32813 -4.3E+0015
-22.40240 20.30202 -4.3E+0015
-22.40383 20.27882 -4.3E+0015
-22.40579 20.25964 -4.3E+0015
-22.40820 20.24600 -4.3E+0015
-22.40945 20.23944 -4.3E+0015
-22.40346 20.23741 -4.3E+0015
-22.39212 20.22206 -4.3E+0015
-22.39124 20.18338 -4.3E+0015
-22.39515 20.14256 -4.3E+0015
-22.39857 20.10868 -4.3E+0015
-22.40100 20.08127 -4.2E+0015
-22.40275 20.05874 -4.2E+0015
-22.40409 20.03998 -4.2E+0015
-22.40522 20.02431 -4.2E+0015
-22.40623 20.01140 -4.2E+0015
-22.40724 20.00111 -4.2E+0015
-22.40834 19.99357 -4.2E+0015
-22.40966 19.98914 -4.2E+0015
-22.41132 19.98856 -4.2E+0015
-22.41328 19.99309 -4.2E+0015
-22.41413 20.00416 -4.2E+0015
-22.40840 20.01972 -4.2E+0015
-22.39701 20.02296 -4.2E+0015
-22.39569 20.00142 -4.2E+0015
-22.39942 19.97571 -4.2E+0015
-22.40266 19.95608 -4.2E+0015
-22.40487 19.94234 -4.2E+0015
-22.40639 19.93292 -4.2E+0015
-22.40752 19.92668 -4.2E+0015
-22.40844 19.92297 -4.2E+0015
-22.40927 19.92146 -4.2E+0015
-22.41011 19.92204 -4.2E+0015
-22.41104 19.92484 -4.2E+0015
-22.41218 19.93024 -4.2E+0015
-22.41363 19.93899 -4.2E+0015
-22.41530 19.95233 -4.2E+0015
-22.41589 19.97177 -4.2E+0015
-22.41031 19.99581 -4.2E+0015
-22.39881 20.00894 -4.2E+0015
-22.39726 19.99643 -4.2E+0015
-22.40121 19.97802 -4.2E+0015
-22.40464 19.96521 -4.2E+0015
-22.40694 19.95815 -4.2E+0015
-22.40851 19.95528 -4.2E+0015
-22.40967 19.95545 -4.2E+0015
-22.41062 19.95798 -4.2E+0015
-22.41147 19.96253 -4.2E+0015
-22.41233 19.96900 -4.2E+0015
-22.41329 19.97752 -4.2E+0015
-22.41444 19.98845 -4.2E+0015
-22.41588 20.00253 -4.2E+0015
-22.41750 20.02096 -4.2E+0015
-22.41801 20.04528 -4.2E+0015
-22.41250 20.07453 -4.2E+0015
-22.40065 20.09448 -4.2E+0015
-22.39874 20.08842 -4.2E+0015
-22.40303 20.07478 -4.2E+0015
-22.40679 20.06640 -4.2E+0015
-22.40931 20.06381 -4.2E+0015
-22.41103 20.06544 -4.2E+0015
-22.41231 20.07012 -4.2E+0015
-22.41335 20.07714 -4.2E+0015
-22.41430 20.08616 -4.3E+0015
-22.41526 20.09706 -4.3E+0015
-22.41631 20.10996 -4.3E+0015
-22.41755 20.12521 -4.3E+0015
-22.41909 20.14351 -4.3E+0015
-22.42079 20.16604 -4.3E+0015
-22.42139 20.19436 -4.3E+0015
-22.41603 20.22793 -4.3E+0015
-22.40359 20.25389 -4.3E+0015
-22.40102 20.25385 -4.3E+0015
-22.40562 20.24457 -4.3E+0015
-22.40979 20.24022 -4.3E+0015
-22.41262 20.24178 -4.3E+0015
-22.41456 20.24770 -4.3E+0015
-22.41602 20.25678 -4.3E+0015
-22.41723 20.26829 -4.3E+0015
-22.41833 20.28187 -4.3E+0015
-22.41945 20.29740 -4.3E+0015
-22.42067 20.31498 -4.3E+0015
-22.42210 20.33495 -4.3E+0015
-22.42383 20.35801 -4.3E+0015
-22.42578 20.38530 -4.3E+0015
-22.42671 20.41838 -4.3E+0015
-22.42175 20.45713 -4.3E+0015
-22.40877 20.48999 -4.3E+0015
-22.40528 20.49729 -4.3E+0015
-22.41015 20.49379 -4.3E+0015
-22.41483 20.49501 -4.3E+0015
-22.41809 20.50243 -4.3E+0015
-22.42040 20.51457 -4.3E+0015
-22.42219 20.53018 -4.3E+0015
-22.42371 20.54854 -4.3E+0015
-22.42514 20.56930 -4.3E+0015
-22.42658 20.59234 -4.3E+0015
-22.42815 20.61778 -4.3E+0015
-22.42995 20.64598 -4.3E+0015
-22.43208 20.67763 -4.3E+0015
-22.43449 20.71386 -4.3E+0015
-22.43603 20.75627 -4.3E+0015
-22.43183 20.80506 -4.3E+0015
-22.41861 20.84995 -4.3E+0015
-22.41415 20.87034 -4.3E+0015
-22.41925 20.87873 -4.3E+0015
-22.42448 20.89185 -4.3E+0015
-22.42817 20.91164 -4.3E+0015
-22.43074 20.93653 -4.3E+0015
-22.43263 20.96507 -4.3E+0015
-22.43408 20.99622 -4.3E+0015
-22.43522 21.02925 -4.3E+0015
-22.43615 21.06353 -4.3E+0015
-22.43694 21.09859 -4.4E+0015
-22.43768 21.13408 -4.4E+0015
-22.43850 21.16990 -4.4E+0015
-22.43939 21.20643 -4.4E+0015
-22.43940 21.24462 -4.4E+0015
-22.43388 21.28451 -4.4E+0015
-22.41856 21.31680 -4.4E+0015
-22.41110 21.32044 -4.4E+0015
-22.41468 21.30590 -4.4E+0015
-22.41913 21.29163 -4.4E+0015
-22.42233 21.28092 -4.4E+0015
-22.42468 21.27306 -4.4E+0015
-22.42662 21.26735 -4.4E+0015
-22.42840 21.26352 -4.4E+0015
-22.43018 21.26158 -4.4E+0015
-22.43203 21.26168 -4.4E+0015
-22.43405 21.26411 -4.4E+0015
-22.43633 21.26930 -4.4E+0015
-22.43899 21.27793 -4.4E+0015
-22.44202 21.29110 -4.4E+0015
-22.44448 21.31031 -4.4E+0015
-22.44165 21.33621 -4.4E+0015
-22.42793 21.36071 -4.4E+0015
-22.42059 21.36229 -4.4E+0015
-22.42536 21.34847 -4.4E+0015
我需要像这样的图表
简单来说,我需要使用全部 3 列。我开始像
plot "data.txt" using 1,\
"data.txt" using 2,\
"data.txt" using 3
但它并没有像我想要的那样工作。我的结果非常糟糕,正如这个示例所示
我从未使用过任何绘图系统,但我的毕业设计需要它。如果你能帮助我,我会非常高兴。
答案1
我认为您的第一个图不是根据您提供的数据绘制的。在该图上,点在垂直轴上大约位于 50 到 80 之间。在数据文件中,没有一个点在该范围内。
不过,也许这个脚本可以帮助您入门。
# Horizontal grid lines only.
set grid y linetype 1 linecolor 0 linewidth -0.5
# Plots with lines instead of points.
set style data lines
# Legend below the plot.
set key outside bottom center horizontal
# Extend the range of the axis a little so the data points don't end up
# on the edge of the plot.
set offsets graph 0.1, graph 0.1, graph 0.1, graph 0.1
# Remove the border around the plot.
unset border
# No tick marks on the right and top.
set xtics nomirror
set ytics nomirror
set title 'Chart Title'
# Make the lines thicker by setting lw (short for linewidth) larger than 1.
plot 'data.txt' using 1 lw 3 title 'Potenciální',\
'data.txt' using 2 lw 3 title 'Kinetická',\
'data.txt' using 3 lw 3 title 'Celková'