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

Home » Public Forums » archive » Set graphics variables once, function graphics
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
Set graphics variables once, function graphics [message #92804] Wed, 02 March 2016 12:15 Go to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
Hi,

I'm trying to make a set of plots that are slightly different using function graphics. Is there any way to set the various graphics properties once and have them apply to all of the plots (i.e., change the defaults)? I know how to use system variables for direct graphics, but so far have defined the properties over and over again for these plots and can't find a way to do otherwise.

Thanks!
Re: Set graphics variables once, function graphics [message #92807 is a reply to message #92804] Wed, 02 March 2016 17:23 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Wednesday, March 2, 2016 at 3:15:19 PM UTC-5, laura...@gmail.com wrote:
> Hi,
>
> I'm trying to make a set of plots that are slightly different using function graphics. Is there any way to set the various graphics properties once and have them apply to all of the plots (i.e., change the defaults)? I know how to use system variables for direct graphics, but so far have defined the properties over and over again for these plots and can't find a way to do otherwise.
>
> Thanks!

You can define an anonymous structure that describes your style, and pass that
to function graphics routines using the _EXTRA mechanism

mystyle = {thick: 3, color: 'red', xtitle: 'happiness', ytitle: 'joy'}
p = plot( [0, 1], _extra = mystyle)

This way, you define your properties once (in the structure) and use them
in all of your plots.

All the best,

David
Re: Set graphics variables once, function graphics [message #92809 is a reply to message #92807] Thu, 03 March 2016 09:52 Go to previous messageGo to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
Thanks! It always baffles me how folks in this discussion group know all these little options.....


On Wednesday, March 2, 2016 at 8:23:54 PM UTC-5, David Grier wrote:
> On Wednesday, March 2, 2016 at 3:15:19 PM UTC-5, laura...@gmail.com wrote:
>> Hi,
>>
>> I'm trying to make a set of plots that are slightly different using function graphics. Is there any way to set the various graphics properties once and have them apply to all of the plots (i.e., change the defaults)? I know how to use system variables for direct graphics, but so far have defined the properties over and over again for these plots and can't find a way to do otherwise.
>>
>> Thanks!
>
> You can define an anonymous structure that describes your style, and pass that
> to function graphics routines using the _EXTRA mechanism
>
> mystyle = {thick: 3, color: 'red', xtitle: 'happiness', ytitle: 'joy'}
> p = plot( [0, 1], _extra = mystyle)
>
> This way, you define your properties once (in the structure) and use them
> in all of your plots.
>
> All the best,
>
> David
Re: Set graphics variables once, function graphics [message #92815 is a reply to message #92809] Fri, 04 March 2016 09:54 Go to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Thursday, March 3, 2016 at 12:52:12 PM UTC-5, laura...@gmail.com wrote:
> Thanks! It always baffles me how folks in this discussion group know all these little options.....
>
>
> On Wednesday, March 2, 2016 at 8:23:54 PM UTC-5, David Grier wrote:
>> On Wednesday, March 2, 2016 at 3:15:19 PM UTC-5, laura...@gmail.com wrote:
>>> Hi,
>>>
>>> I'm trying to make a set of plots that are slightly different using function graphics. Is there any way to set the various graphics properties once and have them apply to all of the plots (i.e., change the defaults)? I know how to use system variables for direct graphics, but so far have defined the properties over and over again for these plots and can't find a way to do otherwise.
>>>
>>> Thanks!
>>
>> You can define an anonymous structure that describes your style, and pass that
>> to function graphics routines using the _EXTRA mechanism
>>
>> mystyle = {thick: 3, color: 'red', xtitle: 'happiness', ytitle: 'joy'}
>> p = plot( [0, 1], _extra = mystyle)
>>
>> This way, you define your properties once (in the structure) and use them
>> in all of your plots.
>>
>> All the best,
>>
>> David

It's something to do with the inexorable passage of time.

Sigh.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Harris website down?
Next Topic: SPAWN EXIT_STATUS not the same as shell. Ideas?

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

Current Time: Wed Oct 08 11:35:04 PDT 2025

Total time taken to generate the page: 0.00537 seconds