Help in Plotting graphs in GDL

Help
2014-07-11
2014-07-21
  • Soumyaranjan Dash

    I was plotting graphs in gdl window in Ubuntu 12.04.
    I dont know how to export the graph into any image file.??
    How to plot multiple plots in GDl ???

     
  • Sylwester Arabas

    Hi,

    To save a plot in a postscript file, you do:
    GDL> set_plot, 'ps'
    GDL> plot...
    GDL> device, /close

    The same works for 'svg'.
    To bring back X output, just do set_plot, 'x'.

    To open a new window, use "window"

    HTH,
    Sylwester

     
  • Soumyaranjan Dash

    Hi,
    Thanks for the instructions.
    Which image formats are available in gdl ?
    How can i change the colour of the graphic window ??
    How can i plot two functions having same x axis range but different y value, in a same window...?

     
  • Sylwester Arabas

    Hi,

    If you're asking for raster image formats, you can use JPEG, PNG, TIFF, BMP, ... The corresponding routines are: WRITE_PNG, READ_PNG, QUERY_PNG, ...

    If you want to save a plot into a raster image, first use the 'z' terminal (i.e. set_plot, 'z') and then write to a file by acquireing the data from the z buffer, e.g.:

    GDL> set_plot, 'z'
    GDL> plot, sin(findgen(20))
    GDL> write_png, 'plik.png', tvrd()

    To change the backgroud color of a plot, you can use the BACKGROUND keyword of the PLOT routine.

    To plot a second dataset, you can use the OPLOT procedure.

    HTH,
    Sylwester

     
  • Soumyaranjan Dash

    Thanks a lot for the reply. Its now way bit eaiser to plot in gdl. Thanks for this freeware.

     
  • Soumyaranjan Dash

    Hii
    Me once again..
    How can i write something against a plot in GDL ??

    plot,t,c1,xtitle='Time',ytitle='SinT',background=110,linestyle=4
    vline,5,linestyle=2
    vline,20,linestyle=2

    I want to name the vertical lines.
    If i want to name the line at 5 to be 'max'
    and line at 20 to be 'min'
    How can i do that ?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks