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

Home » Public Forums » archive » Problem of converting plots with both plotimage and multiplot to postscript
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
Problem of converting plots with both plotimage and multiplot to postscript [message #86069] Mon, 30 September 2013 03:21 Go to next message
Jeffrey Chan is currently offline  Jeffrey Chan
Messages: 3
Registered: May 2011
Junior Member
Hi all,

I was trying to plot some fits images using a combination plotimage.pro and multiplot.pro, it appears fine on my screen as well as output as PNG using write_png.pro. Below is what it look like when I export the plot as PNG:

http://i.imgur.com/XKYK8mX.png

But when I export it to PostScript, after conversion it appears to be something like this:

http://i.imgur.com/b2CfdF5.png

As you can see there's weird pixels plotted on my PS. I set it in IDL like this:

set_plot,'ps'
!p.font=0
device,filename= outfile,$
xsize= some number,$
ysize= some number,$
/encapsulate

multiplot,[0,3,6,0,0],xxxxxxx
....
plotimage, xxxx
....
multiplot,/reset

and of course, device,/close at the bottom.

It happens when I run my code on either my Linux machine or my Mac. I have never encountered such a problem when I plot postscript using plotimage nor multiplot before.

Thanks!
Re: Problem of converting plots with both plotimage and multiplot to postscript [message #86071 is a reply to message #86069] Mon, 30 September 2013 05:52 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
jeffreyrdcs@gmail.com writes:

> I was trying to plot some fits images using a combination plotimage.pro and multiplot.pro, it appears fine on my screen as well as output as PNG using write_png.pro. Below is what it look like when I export the plot as PNG:
>
> http://i.imgur.com/XKYK8mX.png
>
> But when I export it to PostScript, after conversion it appears to be something like this:
>
> http://i.imgur.com/b2CfdF5.png
>
> As you can see there's weird pixels plotted on my PS. I set it in IDL like this:
>
> set_plot,'ps'
> !p.font=0
> device,filename= outfile,$
> xsize= some number,$
> ysize= some number,$
> /encapsulate
>
> multiplot,[0,3,6,0,0],xxxxxxx
> ....
> plotimage, xxxx
> ....
> multiplot,/reset
>
> and of course, device,/close at the bottom.
>
> It happens when I run my code on either my Linux machine or my Mac. I have never encountered such a problem when I plot postscript using plotimage nor multiplot before

It results from using indexed color in your PostScript device. Your
color table is being contaminated, probably from the labels you are
writing on your images. Setting your PostScript device up correctly is
handled for you if you use PS_Start/PS_End to configure the device, or
you can probably just include a DECOMPOSED=1 keyword on your Device
command to clear this up.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Problem of converting plots with both plotimage and multiplot to postscript [message #86072 is a reply to message #86069] Mon, 30 September 2013 05:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
jeffreyrdcs@gmail.com writes:

> I was trying to plot some fits images using a combination plotimage.pro and multiplot.pro, it appears fine on my screen as well as output as PNG using write_png.pro. Below is what it look like when I export the plot as PNG:
>
> http://i.imgur.com/XKYK8mX.png
>
> But when I export it to PostScript, after conversion it appears to be something like this:
>
> http://i.imgur.com/b2CfdF5.png
>
> As you can see there's weird pixels plotted on my PS. I set it in IDL like this:
>
> set_plot,'ps'
> !p.font=0
> device,filename= outfile,$
> xsize= some number,$
> ysize= some number,$
> /encapsulate
>
> multiplot,[0,3,6,0,0],xxxxxxx
> ....
> plotimage, xxxx
> ....
> multiplot,/reset
>
> and of course, device,/close at the bottom.
>
> It happens when I run my code on either my Linux machine or my Mac. I have never encountered such a problem when I plot postscript using plotimage nor multiplot before

It is also possible that this is due to an out-of-date Astronomy
library. Get the latest version and make sure that is the one you are
using. Or, ditch the Astronomy Library version of the Coyote Library and
download the install the latest Coyote Library. This is the best way to
be sure you are up to date. Update both libraries frequently to be sure
you are using the latest software.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Problem of converting plots with both plotimage and multiplot to postscript [message #86073 is a reply to message #86071] Mon, 30 September 2013 12:42 Go to previous message
Jeffrey Chan is currently offline  Jeffrey Chan
Messages: 3
Registered: May 2011
Junior Member
David Fanning於 2013年9月30日星期一UTC+2下午2時52分10秒寫道:
> jeffreyrdcs@gmail.com writes:
>
>
>
>> I was trying to plot some fits images using a combination plotimage.pro and multiplot.pro, it appears fine on my screen as well as output as PNG using write_png.pro. Below is what it look like when I export the plot as PNG:
>
>>
>
>> http://i.imgur.com/XKYK8mX.png
>
>>
>
>> But when I export it to PostScript, after conversion it appears to be something like this:
>
>>
>
>> http://i.imgur.com/b2CfdF5.png
>
>>
>
>> As you can see there's weird pixels plotted on my PS. I set it in IDL like this:
>
>>
>
>> set_plot,'ps'
>
>> !p.font=0
>
>> device,filename= outfile,$
>
>> xsize= some number,$
>
>> ysize= some number,$
>
>> /encapsulate
>
>>
>
>> multiplot,[0,3,6,0,0],xxxxxxx
>
>> ....
>
>> plotimage, xxxx
>
>> ....
>
>> multiplot,/reset
>
>>
>
>> and of course, device,/close at the bottom.
>
>>
>
>> It happens when I run my code on either my Linux machine or my Mac. I have never encountered such a problem when I plot postscript using plotimage nor multiplot before
>
>
>
> It results from using indexed color in your PostScript device. Your
>
> color table is being contaminated, probably from the labels you are
>
> writing on your images. Setting your PostScript device up correctly is
>
> handled for you if you use PS_Start/PS_End to configure the device, or
>
> you can probably just include a DECOMPOSED=1 keyword on your Device
>
> command to clear this up.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")



It works! thank you very much!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Extracting plot boundaries
Next Topic: IDL Java Bridge and bio-format

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

Current Time: Wed Oct 08 11:27:27 PDT 2025

Total time taken to generate the page: 0.00537 seconds