GNUPLOT: Plotting on the surface of a sphere

前端 未结 2 827
挽巷
挽巷 2020-12-15 13:34

I have a function dependent on phi and theta, which I want to plot on the surface of a sphere. The date is stored in a .txt file with the columns:

1: x = R*s         


        
相关标签:
2条回答
  • 2020-12-15 14:16

    At a guess, maybe the depth ordering is causing some trouble. Have you tried the pm3d "hidden3d" option?

    from the gnuplot help on pm3d:

    The option hidden3d takes as the argument a linestyle which must be created by set style line .... (The style need not to be present when setting pm3d, but it must be present when plotting). If set, lines are drawn using the specified line style, taking into account hidden line removal. This is by far more efficient than using the command set hidden3d as it doesn't really calculate hidden line removal, but just draws the filled polygons in the correct order. So the recommended choice when using pm3d is

     set pm3d at s hidden3d 100
     set style line 100 lt 5 lw 0.5
     unset hidden3d
     unset surf
     splot x*x+y*y
    
    0 讨论(0)
  • 2020-12-15 14:24

    I found the solution to my problem by adding the following line:

    set pm3d depthorder
    
    0 讨论(0)
提交回复
热议问题