comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Problem of converting plots with both plotimage and multiplot to postscript
items: Re: Problem of converting plots with both plotimage and multiplot to postscript

Problem of converting plots with both plotimage and multiplot to postscript
type: item
description: 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!
creator: Jeffrey Chan
date: 2013-09-30T10:21:34-00:00

Re: Problem of converting plots with both plotimage and multiplot to postscript
type: item
description: 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.")
creator: David Fanning
date: 2013-09-30T12:52:10-00:00

Re: Problem of converting plots with both plotimage and multiplot to postscript
type: item
description: 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.")
creator: David Fanning
date: 2013-09-30T12:55:20-00:00

Re: Problem of converting plots with both plotimage and multiplot to postscript
type: item
description: 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!
creator: Jeffrey Chan
date: 2013-09-30T19:42:55-00:00