Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Trouble using Coyote Graphics library to write PostScript file - keywords from cgps_config aren't accepted by cgps_open
I'm trying to create a PostScript file with the intention of converting it into a 1000x800 pixel .png image (I'm doing this because I'm having difficulty with using WRITE_PNG to output plots with labels in Times New Roman without the words looking pixelated). To do this I've tried defining a window in IDL and then using cpgs_config to record the necessary window information before passing it to cgps_open, as described on David Fanning's page: http://www.idlcoyote.com/ps_tips/ps_aspect.php, like so: WINDOW, XSize=1000, YSize=800 dat_window = cgps_config() cgPS_Open, FILENAME='Test_ps.ps', TT_FONT = 'Times', CHARSIZE = 2.0,_REF_EXTRA = dat_window However, the program fails at the last line, outputting an error message: "Keyword FONT_SIZE not allowed in call to: CGPS_CONFIG". Is there any way to not have this variable outputted by cgps_config? Alternatively, is there any other way of creating a PostScript file that will convert to a 1000x800 pixel PNG file? I'd be grateful for any advice anyone could give me.
Re: Trouble using Coyote Graphics library to write PostScript file - keywords from cgps_config aren't accepted by cgps_open
jasdeepsinghanand@googlemail.com writes: > I'm trying to create a PostScript file with the intention of converting it into a 1000x800 pixel .png image (I'm doing this because I'm having difficulty with using WRITE_PNG to output plots with labels in Times New Roman without the words looking pixelated). > > To do this I've tried defining a window in IDL and then using cpgs_config to record the necessary window information before passing it to cgps_open, as described on David Fanning's page: http://www.idlcoyote.com/ps_tips/ps_aspect.php, like so: > > WINDOW, XSize=1000, YSize=800 > dat_window = cgps_config() > cgPS_Open, FILENAME='Test_ps.ps', TT_FONT = 'Times', CHARSIZE = 2.0,_REF_EXTRA = dat_window > > However, the program fails at the last line, outputting an error message: "Keyword FONT_SIZE not allowed in call to: CGPS_CONFIG". Is there any way to not have this variable outputted by cgps_config? Alternatively, is there any other way of creating a PostScript file that will convert to a 1000x800 pixel PNG file? I'd be grateful for any advice anyone could give me. fontSize = !P.Charsize !P.Charsize=2.0 cgPS_Open, 'test.png', TT_FONT='Times' cgDisplay, 1000, 800 ... graphics commands go here. cgClose, WIDTH=1000 !P.Charsize=fontSize You may well have to have the lastest version of the Coyote Library. 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.")
David Fanning writes: > cgClose, WIDTH=1000 Whoops, cgPS_Close, WIDTH=100 Of course. :-) 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.")
David, This worked fine once I downloaded the latest version of the CG library. Thanks! On Thursday, 27 February 2014 18:47:26 UTC, David Fanning wrote: > David Fanning writes: > > > >> cgClose, WIDTH=1000 > > > > Whoops, > > > > cgPS_Close, WIDTH=100 > > > > Of course. :-) > > > > 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.")