Device 'ps' doesn't produce anything!

Help
2013-07-09
2013-07-11
  • Following an example given in: http://www.sgeier.net/tools/GDL-intro.pdf, I
    tried to produce a 'ps' file
    in the following way:

    set_plot,'ps'
    x=findgen(150)/50
    plot,x,cos(3x)exp(-x),xtitle='x',title='dampened cosine'
    device,/close
    set_plot,'x'
    $evince gdl.ps

    The output is a white "empty" page. However, if I execute the lines with
    the 'x' default device
    it displays an image: images and texts in white with black background.

    Do you have any idea on what's happening?

    Thanks,

    -Sergio.

    P.S. Are there any other devices than 'ps' and 'x'?


     
  • Joanna
    Joanna
    2013-07-10

    There is an issue with the default plotting colour for postscripts on some machines.

    Try setting !p.color=0 before plotting.

     
  • There is also the z-buffer device called 'z' besides the 'ps' and 'x' ones. It is useful for instance for storing the plots in raster image files like PNG:

    GDL> set_plot, 'z'
    GDL> plot, sin(findgen(100)/100)
    GDL> write_png, 'test.png', tvrd()

    Best,
    Sylwester