f



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 difficu=
lty with using WRITE_PNG to output plots with labels in Times New Roman wit=
hout the words looking pixelated).=20

To do this I've tried defining a window in IDL and then using cpgs_config t=
o record the necessary window information before passing it to cgps_open, a=
s described on David Fanning's page: http://www.idlcoyote.com/ps_tips/ps_as=
pect.php, like so:

WINDOW, XSize=3D1000, YSize=3D800
dat_window =3D cgps_config()
cgPS_Open, FILENAME=3D'Test_ps.ps', TT_FONT =3D 'Times', CHARSIZE =3D 2.0,_=
REF_EXTRA =3D 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 a=
ny 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.
0
jasdeepsinghanand
2/27/2014 6:19:39 PM
comp.lang.idl-pvwave 12260 articles. 4 followers. Post Follow

3 Replies
962 Views

Similar Articles

[PageSpeed] 39

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.")
0
David
2/27/2014 6:42:20 PM
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.")
0
David
2/27/2014 6:47:26 PM
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.")

0
jasdeepsinghanand
2/27/2014 11:45:40 PM
Reply:

Similar Artilces:

replacing a file using 'Write JPEG File(6_1).vi'
when windows prompts for the file name to save the jpg, if I type in or choose an already existing file name, the jpg image fails to change. It works fine if I enter a unique file name. Any help? You're right. I had something else in my way. Thanks for opening my eyes. ...

Eudora can't write to file so can't start
I start Eudora. I get the mailbox In has been changed and is different from the table of contents error. I click rebuild. I get the error message saying can'r open file eudora\attachablah-blah (loads of sgquiggle charcters I can't recreate). I click ok and get an unhandled exception error. Then I get the illegal operation closing down error. then we cycle endlessly though it. I can't get Eudora started and would be grateful for ideas. Thanks in advance, BB Big Bill <kruse@cityscape.co.uk> wrote in news:qhedk0lpmnjgkd9hnia5q82cqfbccnfrfl@4ax.com: > I star...

IDL Astron Library now uses Coyote Graphics
I have updated 21 plotting routines in the IDL Astron Library (http://idlas= tro.gsfc.nasa.gov) to use the Coyote Graphics routines ( http://www.idlcoyo= te.com/graphics_tips/coyote_graphics.html ) internally. The list of updat= ed routines includes al_legend.pro, ploterror.pro, multiplot.pro, tvcircle.= pro, partvelvec.pro and histogauss.pro. The subset of Coyote graphics routines needed to run these procedures is in= cluded in the Astron library distribution=20 ( http://idlastro.gsfc.nasa.gov/ftp/pro/coyote/ ). However, I encourage u= sers to delete this directory, and download...

Write to text file. Append to existing file. Create file if file doesn't exist.
Hi folks, &nbsp; up to LabVIEW 7 there was a wonderful "Write to Text&nbsp;File" vi which allowed the option "Append to File". Now, in LabVIEW 8, this old vi is not longer supported anymore. Instead, I am suggested to use a new "Write to Text File" vi. This vi does not offer the option "Append to File" anymore. Rather it is proposed in the online help that one should use the "Set File Position" in order to append text to the file. This much less straightforward than the old solution. Furthermore, I miss an option which would create the ...

why can't i use the function i write in the m-file?
Why can't i use the function i write in the m-file? It says i didn't define the vector. Below is my function: function [mean,stdev]=stat(x) n=length(x); mean=sum(x)/n; stdev=sqrt(sum((x-mean).^2/n)); "Zhang Dina" <s0863468@mailserv.cuhk.edu.hk> wrote in message <hj3tlo$9l0$1@fred.mathworks.com>... > Why can't i use the function i write in the m-file? It says i didn't define the vector. > Below is my function: > > function [mean,stdev]=stat(x) > n=length(x); > mean=sum(x)/n; > stdev=sqrt(sum((x-mean).^2/n)); a hint...

why can't write to file after using su in daemon service
Hi, Two script, one is daemon, which switches user then calls another script, as following: cat /etc/init.d/myd #!/bin/sh # chkconfig: 345 87 13 # description: # pidfile: /usr/local/me/myd.pid su me "/usr/local/me/my.sh" cat my.sh echo `date` > out.txt if executing as service myd There is error: /usr/local/me/my.sh: line 1: out.txt: Permission denied but if executing as myd then thing is good. Can any one tell how to fix it? -- Thanks John Toronto In article <1154031630.817126.194290@i3g2000cwc.googlegroups.com>, john_woo@canada.com wrote: > Hi, > > Two ...

automatic copying of files (using batch file) from a network drive to local using task scheduler doesn't work.
sorry for the long-winded header. The batch file is as such: --------------------------------------- ECHO on ECHO Running backups... COPY /Y K:\data2001\ data2001\ COPY /Y K:\DATA2002\ DATA2002\ ECHO BACK UP SUCCESSFUL >> back.log. ---------------------------------------- easy, right? It works when I run it manually. I check the access times of the files in the folder that they're copied to, and it works. I scheduled the task, but when I run it the only part that works is the echo to the back.log file. Any ideas on this? K is a permanent mapped netw...

Trouble using ssh gem in OSX; can't load the library.
Bare with me here as I am very new to all of this. I'm trying to write a simple script with the SSH gem and when I run it in the terminal I get this message. /ssh_restart.rb:3:in `require': no such file to load -- net/ssh (LoadError) Here is the code: #!/usr/bin/ruby require 'net/ssh' Net::SSH.start('10.0.1.200', 'Administrator', 'pw') do |ssh| Dir.foreach('.') do |file| puts file end end What am I doing wrong? -- Posted via http://www.ruby-forum.com/. On Fri, Jun 13, 2008 at 6:25 PM, Anton Blaga <antonblaga@gmail.com> w...

Using ./
Hi all- I'm searching through the help for NDSolve, and I run into the following: Plot[Evaluate[y[x] /. s], {x, 0, 30}, PlotRange -> All] Also, in the following tutorial on DSolve Plotting: http://reference.wolfram.com/mathematica/tutorial/DSolvePlottingTheSolution.html the following occurs: Plot[Evaluate[y[x] /. sol /. {C[1] -> 1}], {x, -7, 7}, PlotRange -> All] The trouble is, in the above tutorial I don't understand why you use y[x] /. sol at all. Shouldn't this just be replacing y[x] with sol? If I run 'sol' directly, I get {{y -> Function...

Why aren't "tri-valent" comparison functions used in the standard library?
Hello Group! The venerable qsort takes a takes a comparison function that returns an integer less than, equal to, and greater than zero for x < y, x == y, and x > y, respectively (where x and y are the arguments of the comparison function). But the standard library is based on boolean comparison functions that are true for x < y, and false otherwise. It seems to me that this introduces a modest inefficiency when testing for equality, as you have to call the comparison function twice, i.e., x == y if lessThan (x, y) and lessThan (y, x) are both false. Lots of times, ...

Using Express Write LabVIEW File to store data in subprogram doesn't overwrite.
The main program is an Event Structure that controls four other subprograms. In the subprograms the data is stored in the express IV Write LabVIEW Measurement File set up to overwrite the collected data. When the subprogram is stopped with the main still open, then restarted, the file is appended not overwritten. It appends where the last time the previous file was stopped. There is an input to the Wrive LabVIEW Measurement File which is entitled 'reset.' Make sure that is set to true so that the file writing process starts over each time data enters the Express VI. John M ...

Trouble renaming files using 'movefile'
I'm trying to find a way to rename files in a directory by using MATLAB. With 'movefile' I have to explicitly type the name of the file for each argument and can't seem to use a variable name: movefile ('file1', 'file2') Is there a way (with or without movefile - maybe some other scheme in MATLAB) to rename a series of files in a directory where file2 is actually a variable representing a text string containing the new name of the file? For example, when I start my program the first file may be called a.txt and depending on other issues I may decide that it ...

engGetVariable giving error: "Error using save Can't write file stdio"
Hello everyone, - In my program.cpp, I store a floating point image in array named as pixel1C with (height, width). And then sends this data to Matlab for computation. - The size of output by Matlab will be 5 times the input data size. *Very similar to this post but I am not using memcpy: https://groups.google.com/forum/#!topic/comp.soft-sys.matlab/3HKYPYoxkWc /**** code snippet ***/ int main(){ ... mxArray *pmxImg=NULL, *result=NULL, *data=NULL; pmxImg = mxCreateDoubleMatrix(width, height, mxREAL); /* Get pointer to real portion of data */ d...

When I place a 'write to measurement file' express I get an 'Error in prop page construction: Control Label: Streaming' Using Labview 8 on XP. Any ideas?
When I place express 'write to measurement file'&nbsp; I get&nbsp;an error &nbsp;'Error in prop page construction: Control Label: Streaming Couldn't find control/constant on the instance.' &nbsp; Help!!!!! &nbsp; Please. &nbsp; Regards &nbsp; Derek The error happens as soon as I place the symbol.&nbsp; The symbol is there and the properties are all accessible, but will not run. &nbsp; &nbsp;I enclose word doc with error messages on. &nbsp; Many thanks in anticipation &nbsp; Derek LabviewA.doc: http://forums.ni.com/attachme...

Aren't session variable preserved using "Header('Location: xxx')"?
I am trying to pass some info to another page on my site. I set "session_start()" in page 1, assign a session variable to a value, then execute a "header('Location: ....')." But on the target page I don't get any session variable values! BTW, I used a relative location in the Location header, not an absolute URL. The behavior looks like it started another session, but it should not have. Ideas? TIA, Larry Woods "lwoods" <larry@lwoods.com> wrote in message news:RPqzf.8953$JT.6285@fed1read06... >I am trying to pass some info to ...

Web resources about - Trouble using Coyote Graphics library to write PostScript file - keywords from cgps_config aren't accepted by cgps_open - comp.lang.idl-pvwave

Resources last updated: 2/1/2016 11:47:37 AM