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

Home » Public Forums » archive » Trouble using Coyote Graphics library to write PostScript file - keywords from cgps_config aren't accepted by cgps_open
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Trouble using Coyote Graphics library to write PostScript file - keywords from cgps_config aren't accepted by cgps_open [message #87826 is a reply to message #87825] Thu, 27 February 2014 10:42 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Remote X server
Next Topic: IDL Mac users - whats the difference between launching from the dock icon and launching from an x-window?

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

Current Time: Wed Oct 08 18:00:46 PDT 2025

Total time taken to generate the page: 0.00446 seconds