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