简体   繁体   English

gnuplot 2d绘图到3d栅栏图

[英]gnuplot 2d plot to 3d fence plot

i have a plot looking like this: 我有一个看起来像这样的情节:

http://www.abload.de/img/selection001yplp.png

However the lines are overlapping quite a lot and i'm not able to see as much as i'd like. 然而,线条重叠很多,我无法看到我想要的那么多。 My gnuplot script looks like this: 我的gnuplot脚本看起来像这样:

    set autoscale
    set term pdfcairo font ",4"
    set output "plot.pdf"
    set xdata time
    set format x "%H:%M"
    set timefmt "%s"
    set yrange [0:550]
    plot "file.dat" every 150 using 3:4 title '' with lines, \
         "file.dat" every 150 using 3:5 title '' with lines, \
         "file.dat" every 150 using 3:6 title '' with lines, \
         "file.dat" every 150 using 3:7 title '' with lines, \
         "file.dat" every 150 using 3:8 title '' with lines, \
         "file.dat" every 150 using 3:9 title '' with lines, \
         "file.dat" every 150 using 3:10 title '' with lines, \
         "file.dat" every 150 using 3:11 title '' with lines

and the corresponding file.dat looks like this: 和相应的file.dat看起来像这样:

(.........)
6 1303238171 0 134.332413 140.304581 138.496323 134.021835 105.546227 107.943008 102.812347 109.098152 972.554886
7 1303238171 0 134.232849 140.35408 138.186279 132.489319 105.941231 108.020004 103.009338 109.75119 971.98429
8 1303238171 0 135.125488 138.125427 138.100098 132.543625 106.153214 107.507042 102.338707 125.25383 985.147431
9 1303238171 0 134.341904 139.913376 138.070648 132.368164 106.214211 108.506859 102.963211 155.246277 1017.62465
10 1303238171 1 134.163055 140.042313 139.231033 132.444244 106.161438 108.850807 103.753929 162.19162 1026.838439
11 1303238171 1 134.179016 140.187561 138.68425 132.572876 107.169006 107.507057 102.974937 120.698692 983.973395
12 1303238171 1 134.40593 140.569382 138.604828 139.589264 106.631699 108.092957 103.634117 108.943863 980.47204
13 1303238172 1 134.353363 138.062759 138.344818 140.665985 107.538544 108.983582 104.300827 175.732117 1047.981995
14 1303238172 1 135.190887 140.411484 138.174591 133.823929 105.412224 108.240623 102.790154 120.459106 984.502998
(.........)

Is there an easy way to get this chart looking like a fence plot like on the gnuplot examples page ? 有没有一种简单的方法可以让这个图表像gnuplot示例页面上的栅栏图一样? I looked over it and it seems to be really complicated. 我看了看它似乎真的很复杂。 I wish i could easily add a third dimension without changing the file.dat . 我希望我可以轻松添加第三个维度而无需更改file.dat Do you guy's perhaps know a way to achieve this? 你或许知道一个方法来实现这个目标吗? Or do you have any other ideas how i can make this chart better readable? 或者您是否有任何其他想法如何使这个图表更具可读性?

Best regards, 最好的祝福,

Maybe I do not understand your problem correctly. 也许我不能正确理解你的问题。 But since you are plotting the time on the x-axis, it seems awkward to make that into a 3d plot, since time is only a one dimensional value. 但是由于你正在绘制x轴上的时间,因此将它变成3d绘图似乎很尴尬,因为时间只是一维值。 You typically have 3d plots if you are dealing with surfaces (2d-data), where you plot the temperature, pressure or maybe even time against (at least 1d-data). 如果您正在处理表面(2d数据),您通常会有3d图,您可以在其中绘制温度,压力或甚至是时间(至少1d数据)。

To make the plot more readable and depending on your data maybe multiplots can lighten things up. 为了使绘图更具可读性并且根据您的数据,多点可以使事情更轻松。 Then you can group your data in a couple of plots making it possible to set new ranges for the y-axis?! 那么你可以用几个图表对数据进行分组,从而可以为y轴设置新的范围?!

If I may point out some simplifications to your script: 如果我可以指出一些简化你的脚本:
Make use of the iteration functionality like so: 利用迭代功能,如下所示:

plot for [i=4:11] "file.dat" every 150 using 3:i title '' with lines

And to make that line a little more crisp: 并使这条线更清晰:

plot for [i=4:11] "file.dat" every 150 u 3:i t '' w l

And then again, if you do not want a legend in your plot: 然后,如果你不想在你的情节中有一个传奇:

set key off
plot for [i=4:11] "file.dat" every 150 u 3:i w l

Be advised I didn't test the few lines above, so there might be some typos in them^^. 请注意,我没有测试上面的几行,所以可能会有一些拼写错误^^。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM