开发者

gnuplot 2d plot to 3d fence plot

开发者 https://www.devze.com 2023-03-15 03:48 出处:网络
i have a plot looking like this: 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:

i have a plot looking like this:

gnuplot 2d plot to 3d fence plot

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:

    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.da开发者_Python百科t" 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:

(.........)
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? 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. 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. 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).

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?!

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^^.

0

精彩评论

暂无评论...
验证码 换一张
取 消