export graphics

Help
FedericoP
2014-04-17
2014-04-27
  • FedericoP

    FedericoP - 2014-04-17

    Hi, i try to export a very simple plot but i can't be able to do this.
    When i use set_ps, 'ps'
    and device,/close
    the file.ps is a empty file without any image.

    I post my code:

    pro cum

    file = "KeplerStarData.dat"
    rows =File_Lines(file) ; per le righe
    openr,lun,file,/Get_lun ; per le colonne
    line=""
    readf,lun,line
    cols = n_elements(StrSplit(line, /RegEx, /extract))

    openr,2,"KeplerStarData.dat"
    data1 = dblarr(cols,rows)
    readf,2,data1
    close,2

    x = data1(0,)
    met = data1(3,
    )

    h = histogram(met, binsize=0.1)
    Hnorm= h/480.
    ch = total(Hnorm, /cumulative, /preserve_type)

    plot, ch, psym=10, $ ; psym = point style (10 sono le linee continue)
    TITLE='Cumulative Plot For Metallicity of Kepler Stars', XTITLE='[Fe/H]', $
    YTITLE='Frequency', $
    YRANGE = [MIN(Hnorm), MAX(Hnorm)+1.], $
    thick = 3, color=200

    end

    Thanks !

     
    • giloo

      giloo - 2014-04-27

      hi,
      There are some ridiculous problems like that with the black and white PS output of GDL. You can use the color version (device,/color) that works. The B&W problem is solved in the last cvs version.

       

Log in to post a comment.