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

Home » Public Forums » archive » Re: CgWindow and multiple plots
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
Re: CgWindow and multiple plots [message #82890] Sun, 20 January 2013 12:51 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
gokhansever@gmail.com writes:


> Three more things that I am wondering:
>
> 1-) Comparing to my default way of producing ps outputs (via "device" procedure) cg way produces slightly ticker lines, axes, and ticks. Would these be altered? If so, how?

PS_Start sets the !P.Thick and !P.Charthick system variables to 3. If
you want them something other than that, set these system variables
yourself before you call PS_Start. It only sets them if they are not
currently set.

> 2-) Can I specify the size and position of plotting axis on plotting canvas?

This is always the purpose of the POSITION keyword, although you should
NOT use the POSITION keyword if you are doing multi-plots with !P.MULTI.
Chaos will ensue if you do. If you don't like the positions set with the
!P.Multi system variable, then I would try using cgLayout to get
position coordinates. With this program you can control outside margins,
the gaps between plots, etc.

> 3-) How to make multi-page plots using ps_start /.../ ps_end setup?

Multi-page plots are a function of the PostScript device. Basically,
issuing a graphics command that would normally erase the display before
plotting will start another page of PostScript output. Or, you can
simply use the Erase command to start another page.

; To create two pages with plots.
PS_Start
cgPlot, ...
cgOplot, ...
cgPlot, ...
PS_End

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: CgWindow and multiple plots [message #82891 is a reply to message #82890] Sun, 20 January 2013 12:07 Go to previous messageGo to next message
gsever is currently offline  gsever
Messages: 28
Registered: August 2008
Junior Member
On Sunday, January 20, 2013 11:54:21 AM UTC-7, David Fanning wrote:
> gokhansever@gmail.com writes:
>
>
>
>> I am trying to create multiple plots using CgWindow command.
>
>>
>
>> cgWindow, WMulti=[0,2,3]
>
>> cgPlot, x, y, /AddCmd
>
>> cgControl, output='my.ps'
>
>>
>
>> These basic commands work fine, however can't figure out the following steps yet:
>
>>
>
>> 1-) How to position the plot axis to the 3rd row and 1st column, instead of 1st row and 1st column?
>
>>
>
>> 2-) How to save the file as a letter sized (US Letter, Portrait (8.50 × 11.00 inch)) ps file?
>
>
>
> I would do it like this:
>
>
>
> PS_Start, 'my.ps', XSize=8.0, YSize=10.5, /Inches, $
>
> XOffset=0.25, YOffset=0.25, /NoMatch
>
> cgPlot, cgDemodata(1), Layout=[2,3,3]
>
> PS_End
>
>
>
> Cheers,
>
>
>
> David

Thanks David. Those lines produces the plot settings that I want. I see that ps_start accepts keywords from ps_config which gives lots of flexibility.

Three more things that I am wondering:

1-) Comparing to my default way of producing ps outputs (via "device" procedure) cg way produces slightly ticker lines, axes, and ticks. Would these be altered? If so, how?

2-) Can I specify the size and position of plotting axis on plotting canvas?

3-) How to make multi-page plots using ps_start /.../ ps_end setup?
Re: CgWindow and multiple plots [message #82892 is a reply to message #82891] Sun, 20 January 2013 10:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
gokhansever@gmail.com writes:

> I am trying to create multiple plots using CgWindow command.
>
> cgWindow, WMulti=[0,2,3]
> cgPlot, x, y, /AddCmd
> cgControl, output='my.ps'
>
> These basic commands work fine, however can't figure out the following steps yet:
>
> 1-) How to position the plot axis to the 3rd row and 1st column, instead of 1st row and 1st column?
>
> 2-) How to save the file as a letter sized (US Letter, Portrait (8.50 × 11.00 inch)) ps file?

I would do it like this:

PS_Start, 'my.ps', XSize=8.0, YSize=10.5, /Inches, $
XOffset=0.25, YOffset=0.25, /NoMatch
cgPlot, cgDemodata(1), Layout=[2,3,3]
PS_End

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: CgWindow and multiple plots [message #82923 is a reply to message #82890] Wed, 23 January 2013 19:27 Go to previous message
gsever is currently offline  gsever
Messages: 28
Registered: August 2008
Junior Member
Hi,

Thanks Dave. Sorry for a bit late replying, but sorted out all the questions I was asking about multi-plot layouts.


On Sunday, January 20, 2013 1:51:11 PM UTC-7, David Fanning wrote:
> gokhansever@gmail.com writes:
>
>
>
>
>
>> Three more things that I am wondering:
>
>>
>
>> 1-) Comparing to my default way of producing ps outputs (via "device" procedure) cg way produces slightly ticker lines, axes, and ticks. Would these be altered? If so, how?
>
>
>
> PS_Start sets the !P.Thick and !P.Charthick system variables to 3. If
>
> you want them something other than that, set these system variables
>
> yourself before you call PS_Start. It only sets them if they are not
>
> currently set.
>
>
>
>> 2-) Can I specify the size and position of plotting axis on plotting canvas?
>
>
>
> This is always the purpose of the POSITION keyword, although you should
>
> NOT use the POSITION keyword if you are doing multi-plots with !P.MULTI.
>
> Chaos will ensue if you do. If you don't like the positions set with the
>
> !P.Multi system variable, then I would try using cgLayout to get
>
> position coordinates. With this program you can control outside margins,
>
> the gaps between plots, etc.
>
>
>
>> 3-) How to make multi-page plots using ps_start /.../ ps_end setup?
>
>
>
> Multi-page plots are a function of the PostScript device. Basically,
>
> issuing a graphics command that would normally erase the display before
>
> plotting will start another page of PostScript output. Or, you can
>
> simply use the Erase command to start another page.
>
>
>
> ; To create two pages with plots.
>
> PS_Start
>
> cgPlot, ...
>
> cgOplot, ...
>
> cgPlot, ...
>
> PS_End
>
>
>
> 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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: rounding numbers
Next Topic: Coyote Graphics Plot Gallery Now Open

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

Current Time: Wed Oct 08 19:13:10 PDT 2025

Total time taken to generate the page: 0.00462 seconds