comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Ps_start and Ps_end
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Ps_start and Ps_end [message #75167 is a reply to message #75166] Fri, 18 February 2011 10:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kisCA writes:

> I am trying to make a plot and to export it in png with Ps_start and
> Ps_end but the problem is that the png file missed somethings written
> with xyouts on the right and ths ps file don't.

Are you using today's software? This isn't the
page aspect problem we solved yesterday, is it?

And, I assume you are saying the PostScript file has
the text, but the PNG file does not. Is that correct?

Also, a couple of things about your code:

> PS_start,filename='Lidar Ozone anomalies and fit.ps',/
> nomatch,charsize=0.8
> !p.font=0 ;use postscript fonts
> !p.thick=3 ;data
> !x.thick=2 ;x axis
> !y.thick=2 ;y axis
> device, /helvetica, /isolatin1, xsize=16, ysize=18, decomposed=0, /
> color

There really is no reason to use PS_START if you are going to do
all of this. This is sort of the point of PS_START. It will set
all this stuff up for you.

> plot,time,Zproxy,/nodata,xstyle=1,xrange=[anneedeb,
> 2011],ystyle=1,yrange=[15,50],title='Lidar Ozone anomalies (black) and
> regression fit (red)',$
> ytitle='Altitude (km)',xticks=n_elements(annee),xtickn=[annee,
> 2011]
> xyouts, 2011.5, 48,'R!E2' <---
> for k=0,n_elements(Zproxy)-1,5 do begin
> oplot,time,[Zproxy(k),Zproxy(k)],linestyle=1
> oplot,time,2*Ti(*,k)+Zproxy(k),color=0
> oplot,time,2*mco_T(*,k)+Zproxy(k),color=204
> xyouts, 2011, Zproxy(k),R2str(k) <---
> endfor
> xyouts, 1996, 13,'(0.5 ppmv scaled to 1km)'
> xyouts, 2002.6, 13,'Year'
> PS_end,/png

If the only reason you are using PS_START and PS_END is to
produce a PNG file from the PS file, I'd just use the
ImageMagick convert command. So much simpler. :-)

I have a routine that just takes the name of a PostScript
file and creates a PNG file out of it. Takes about 15 seconds
to write.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ps_start and Ps_end
Next Topic: cgtext and resizeable graphics window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:27:38 PDT 2025

Total time taken to generate the page: 0.88071 seconds