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

Home » Public Forums » archive » cgdisplay
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
cgdisplay [message #90793] Thu, 16 April 2015 05:45 Go to next message
Sverre Solberg is currently offline  Sverre Solberg
Messages: 18
Registered: February 2005
Junior Member
Hi,

I started using David's cgdisplay a year or two ago. Now, when trying to run the same program it crashes and I get an error message:
Traceback Report from CGDISPLAY:

% Expression must be a structure in this context: PS_STRUCT (_$FSC_PS_START_).
% Execution halted at: CGDISPLAY 288 cgdisplay.pro
% $MAIN$

I guess I have downloaded a new version of the coyote lib since then and I see from the header that the last bug fix concerned the use of encaps postscript with a portrait aspect ratio and that's exactly my situation. However, it seems as I'm now not able to use the cgdisplay with a ps device at all. These two commands
set_plot,'ps'
cgdisplay,xsize=2000,ysize=1000

give exactly the samme error message. Am I doing something wrong or is it a bug? The crash occurs here (and it's the 'else'-part that's true). It seems ps_struct is not defined as a struc(?)
IF N_Elements(ps_struct) NE 0 THEN BEGIN
keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize, Landscape=ps_struct.landscape)
ENDIF ELSE BEGIN
keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize)
ps_struct.landscape = keywords.landscape
ENDELSE

Sverre
Re: cgdisplay [message #90794 is a reply to message #90793] Thu, 16 April 2015 06:01 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sverre Solberg writes:

> I started using David's cgdisplay a year or two ago. Now, when trying
to run the same program it crashes and I get an error message:
> Traceback Report from CGDISPLAY:
>
> % Expression must be a structure in this context: PS_STRUCT (_$FSC_PS_START_).
> % Execution halted at: CGDISPLAY 288 cgdisplay.pro
> % $MAIN$
>
> I guess I have downloaded a new version of the coyote lib since then and I see from the header that the last bug fix concerned the use of encaps postscript with a portrait aspect ratio and that's exactly my situation. However, it seems as I'm now not able to use the cgdisplay with a ps device at all. These two commands
> set_plot,'ps'
> cgdisplay,xsize=2000,ysize=1000
>
> give exactly the samme error message. Am I doing something wrong or is it a bug? The crash occurs here (and it's the 'else'-part that's true). It seems ps_struct is not defined as a struc(?)
> IF N_Elements(ps_struct) NE 0 THEN BEGIN
> keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize, Landscape=ps_struct.landscape)
> ENDIF ELSE BEGIN
> keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize)
> ps_struct.landscape = keywords.landscape
> ENDELSE

I think it is a bug. The line just before the ENDELSE should be removed.
I'll do so now, but I don't have time this morning to check it in. I'll
do it when I get back from work.

Thanks for catching this.

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.")
Re: cgdisplay [message #90795 is a reply to message #90794] Thu, 16 April 2015 06:03 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I think it is a bug. The line just before the ENDELSE should be removed.
> I'll do so now, but I don't have time this morning to check it in. I'll
> do it when I get back from work.

Note that using cgPS_Open to configure your PostScript device is a
workaround, too. Probably why I haven't discovered this myself. :-)

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.")
Re: cgdisplay [message #90797 is a reply to message #90795] Thu, 16 April 2015 06:27 Go to previous message
Sverre Solberg is currently offline  Sverre Solberg
Messages: 18
Registered: February 2005
Junior Member
Many thanks! Removing the line solved the problem.
Sverre
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: multi scatter plots, layout issues
Next Topic: Uneven plot symbol sizes

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

Current Time: Wed Oct 08 11:53:57 PDT 2025

Total time taken to generate the page: 0.00424 seconds