Menu

#148 plot_3d

closed
nobody
None
5
2018-04-18
2016-12-09
No

Hi, following a recent exchange with Alain C. it turned out that plot_3d would be a nice function to have.
As an example the python matplotlib-3d library has a nice scatter plot implementation:
https://pythonprogramming.net/matplotlib-3d-scatterplot-tutorial/
Cheers, MP

Discussion

  • giloo

    giloo - 2016-12-10

    As of today, GDL still lacks all "function/object" versions of classical graphical procedures (PLOT, XYOUTS, etc) . Enabling them is a simple task, but a time-consuming one: rewrinting 12+ APIs. There are a few more useful commands to add first (gridding, minimization).

    As the current use of the plplot library complicates the task, extremely so for 3D graphics, writing instead thos functions as python code called from GDL using the GDL-python bridge is probably an excellent solution (somebody interested?).

    At the time, it is possible to fulfill part of the need using old graphic procedures, avoiding some GDL 3D bugs:

    GDL> t = FINDGEN(4001) / 100
    GDL> x = COS(t) * (1 + t / 10)
    GDL> y = SIN(t) * (1 + t / 10)
    GDL> z = SIN(2 * t)
    GDL> scale3,xrange=[-6, 6], YRANGE=[-6, 6],ZRANGE=[-1.4, 1.4]
    GDL> device,decomp=0
    GDL> loadct,13
    GDL> plot,x,y,XRANGE=[-6, 6], YRANGE=[-6, 6],/nodata,/t3D
    GDL> plots,x,y,z,psym=3,/T3D,color=bytscl(t),THICK=4
    GDL> plots,x,y,psym=3,/T3D                
    
     
  • Sylwester Arabas

    • status: open --> closed
     

Log in to post a comment.