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

Home » Public Forums » archive » Re: cgplot and the disappearing white axis
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: cgplot and the disappearing white axis [message #80167] Sun, 13 May 2012 20:21
A J is currently offline  A J
Messages: 11
Registered: February 2012
Junior Member
Ok sorry I will try to be more clear.

I want a black background because I am using this in a presentation,
that will be on a black background, and I thought it would look nicer.

I am using the position keyword because the two plots are of different
sizes and joined at the bottom/top axes respectively. (specifically,
the second one is 1/3 the height of the first one and the bottom axis
of the first plot is the top of the second). so multiplot won't work
since it makes plots all of the same size.

In any case, adding in another line calling cgwindow first before my
lines calling cgplot, as above, seems to have worked. No idea why but
hey :)

Thanks,

Alexis
Re: cgplot and the disappearing white axis [message #80168 is a reply to message #80167] Sun, 13 May 2012 20:04 Go to previous message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
On Sunday, May 13, 2012 8:54:41 PM UTC-6, Coyote wrote:
> Alexis writes:
>
>> I am trying to save a multiplot image to a pdf for a presentation.
>> when the cgwindow pops up, all is well, everything is there as it
>> should be. When I save it to a pdf, only the first plot's axis is
>> there. However, this only happens when I specify the background color
>> and axes' color (ie not /traditional) and ONLY when I specify the axis
>> color to be white. If it is cyan, for example, everything is there in
>> the pdf.
>>
>>
>> cgwindow, 'cgplot', x1, y1, axiscolor='white',
>> background=cgcolor('black')
>>
>> cgwindow, 'cgplot', x2, y2, axiscolor='white', /addcmd, /noerase
>>
>> The multiplot command is there via the position keyword, but not
>> included in the example above. Any ideas why white won't give the
>> second axes when saved to a pdf?
>
> I would guess because you are confused about what you are doing and
> you are confusing the cgWindow. I can hear it going "Huh!" now. :-)
>
> The way you would do a multi-plot command using cgWindow is like this:
>
> cgWindow, WMulti=[0,1,2]
> cgPlot, x1, y1, axiscolor='white', background='black', /AddCmd
> cgPlot, x2, y2, axiscolor='white', /AddCmd
>
> This will produce the correct PDF file for you.

Or, maybe not. Somebody else is going to have to work on the "Why?" for you. I'm retired. But, I will say I never imagined that anyone would ask for a black background, especially in a PDF file. This will give you a black background on the display, and a white background in your PDF file. I think that is what most people want. I'm really not sure what YOU want. :-)

cgWindow, WMulti=[0,1,2], background='black'
cgPlot, x1, y1, /Addcmd
cgPlot, x2, y2, /AddCmd

Cheers,

David
Re: cgplot and the disappearing white axis [message #80169 is a reply to message #80168] Sun, 13 May 2012 19:54 Go to previous message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
Alexis writes:

> I am trying to save a multiplot image to a pdf for a presentation.
> when the cgwindow pops up, all is well, everything is there as it
> should be. When I save it to a pdf, only the first plot's axis is
> there. However, this only happens when I specify the background color
> and axes' color (ie not /traditional) and ONLY when I specify the axis
> color to be white. If it is cyan, for example, everything is there in
> the pdf.
>
>
> cgwindow, 'cgplot', x1, y1, axiscolor='white',
> background=cgcolor('black')
>
> cgwindow, 'cgplot', x2, y2, axiscolor='white', /addcmd, /noerase
>
> The multiplot command is there via the position keyword, but not
> included in the example above. Any ideas why white won't give the
> second axes when saved to a pdf?

I would guess because you are confused about what you are doing and
you are confusing the cgWindow. I can hear it going "Huh!" now. :-)

The way you would do a multi-plot command using cgWindow is like this:

cgWindow, WMulti=[0,1,2]
cgPlot, x1, y1, axiscolor='white', background='black', /AddCmd
cgPlot, x2, y2, axiscolor='white', /AddCmd

This will produce the correct PDF file for you.

Cheers,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgplot and the disappearing white axis
Next Topic: Re: scalar system variable as single element array

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

Current Time: Wed Oct 08 15:11:15 PDT 2025

Total time taken to generate the page: 0.00711 seconds