How to draw distinct line segments in gnuplot using splot

后端 未结 1 776
长发绾君心
长发绾君心 2020-12-21 13:34

I was under the impression that introducing an empty line between points creates disconnected plots.

If file Box.dat contains the following, I expect exactly two dis

相关标签:
1条回答
  • 2020-12-21 13:46

    In 2D (using plot) it is true, that an empty line leads to disconnected line parts, see e.g.

    set autoscale fix
    set offset 0.5,0.5,0.5,0.5
    plot 'Box.dat' using 1:3 w l
    

    In 3D (with splot) a newline separates two lines of a surface. The same points of neighboring lines are then connected to form a surface. In order to get disconnected line segments in 3D you must use two newlines:

    # Box.dat
    0 0 0 
    1 0 0
    
    
    0 0 1  
    1 0 1
    
    0 讨论(0)
提交回复
热议问题