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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Ps_start and Ps_end [message #75162] Fri, 18 February 2011 11:33
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kisCA writes:

> I try with all my strenght but sometimes my brain don't want to
> hear :-)

Yeah, I hear you. Please send me the PostScript file and
the convert command you are using with PS_End (it will
be printed out in the window when you use PS_End).
You can send it to "david" at my domain name.

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.")
Re: Ps_start and Ps_end [message #75163 is a reply to message #75162] Fri, 18 February 2011 11:30 Go to previous message
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
On Feb 18, 11:15 am, David Fanning <n...@idlcoyote.com> wrote:
> OK, I suspect this is the problem then. PS_END, which
> will create the PNG file from the PostScript file, relies
> on information created in PS_Start. Like, for example,
> the size of the output. So, if you are circumventing
> PS_Start to create your own sizes, PS_End won't know
> about it.
>
> If you want to use PS_Start, just set your sizes with it:
>
>    PS_Start, /NoMatch, XSIZE=5, YSIZE=5, /Inches, FILE='test.ps'

I think I undesrtand better now.
I tried as you suggest and also with some changes in xsize to make the
things written on the right appear in the png file but without success
(still appear on ps file)

PS_start,filename='Lidar Ozone anomalies and fit.ps',/
nomatch,charsize=0.6,xsize=5, ysize=5, /Inches
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=FSC_COLOR('black')
oplot,time,2*mco_T(*,k)+Zproxy(k),color=FSC_COLOR('red')
xyouts, 2011, Zproxy(k),R2str(k)
endfor
xyouts, 1996, 13,'(0.5 ppmv scaled to 1km)'
xyouts, 2002.6, 13,'Year'
PS_end,/png


> Then, don't mess around changing anything. :-)

I try with all my strenght but sometimes my brain don't want to
hear :-)

Cheers
Re: Ps_start and Ps_end [message #75164 is a reply to message #75163] Fri, 18 February 2011 11:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> OK, I suspect this is the problem then. PS_END, which
> will create the PNG file from the PostScript file, relies
> on information created in PS_Start. Like, for example,
> the size of the output. So, if you are circumventing
> PS_Start to create your own sizes, PS_End won't know
> about it.
>
> If you want to use PS_Start, just set your sizes with it:
>
> PS_Start, /NoMatch, XSIZE=5, YSIZE=5, /Inches, FILE='test.ps'
>
> Then, don't mess around changing anything. :-)

If you *do* want to muck around, set the /GUI keyword
to PS_Start and you can muck around in PSConfig for
as long as you like. PS_END will still know about it. :-)

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.")
Re: Ps_start and Ps_end [message #75165 is a reply to message #75164] Fri, 18 February 2011 11:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kisCA writes:

> Yes, I downloaded today : coyoteprograms & coyote2ndfiles. Don't seem
> to be the same problem as yesterday.
>
>> And, I assume you are saying the PostScript file has
>> the text, but the PNG file does not. Is that correct?
>
> Yes
>
>> 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.
>
> Sure, in fact I just need to fix xsize and ysize

OK, I suspect this is the problem then. PS_END, which
will create the PNG file from the PostScript file, relies
on information created in PS_Start. Like, for example,
the size of the output. So, if you are circumventing
PS_Start to create your own sizes, PS_End won't know
about it.

If you want to use PS_Start, just set your sizes with it:

PS_Start, /NoMatch, XSIZE=5, YSIZE=5, /Inches, FILE='test.ps'

Then, don't mess around changing anything. :-)

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.")
Re: Ps_start and Ps_end [message #75166 is a reply to message #75165] Fri, 18 February 2011 11:03 Go to previous message
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
On Feb 18, 10:50 am, David Fanning <n...@idlcoyote.com> wrote:
> Are you using today's software? This isn't the
> page aspect problem we solved yesterday, is it?

Yes, I downloaded today : coyoteprograms & coyote2ndfiles. Don't seem
to be the same problem as yesterday.

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

Yes

> 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.

Sure, in fact I just need to fix xsize and ysize

> 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.

Could be useful, I think I have seen it on your website

Cheers
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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 15:47:55 PDT 2025

Total time taken to generate the page: 0.00727 seconds