Changing the symbol, color, etc., of "mean" indicator in box plots [message #88469] |
Wed, 30 April 2014 15:54  |
laura.hike
Messages: 87 Registered: September 2013
|
Member |
|
|
Can anyone give me syntax for changing the symbol used to indicate the mean in box and whisker plots made using BOXPLOT? This is the first time I've used the new graphics methods and obviously I'm missing something.
http://www.exelisvis.fr/docs/boxplot.html tells me to "use this graphic symbol (SYMBOL_MEANS) to control all of the symbol properties for the mean values, if specified. See SYMBOL for more information," but I really don't understand what's said on
http://www.exelisvis.fr/docs/symbol.html
I tried setting foo.symbol_means using
foo.symbol_means = 'tu' setting symbol_means
using the symbol command (symbol_means = symbol(locations, means, 'tu', target = 'foo') and even
foo = symbol_means(locations, means, 'tu') (where 'foo' is the name of the original graphic object).
Most of the time the command was accepted but nothing changed in the plot. Any tips? Surely there's a quick solution.
Thanks!
Laura H.
|
|
|
Re: Changing the symbol, color, etc., of "mean" indicator in box plots [message #88473 is a reply to message #88469] |
Wed, 30 April 2014 21:04   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, April 30, 2014 4:54:46 PM UTC-6, laura...@gmail.com wrote:
> Can anyone give me syntax for changing the symbol used to indicate the mean in box and whisker plots made using BOXPLOT? This is the first time I've used the new graphics methods and obviously I'm missing something.
>
>
>
> http://www.exelisvis.fr/docs/boxplot.html tells me to "use this graphic symbol (SYMBOL_MEANS) to control all of the symbol properties for the mean values, if specified. See SYMBOL for more information," but I really don't understand what's said on
>
>
>
> http://www.exelisvis.fr/docs/symbol.html
>
>
>
> I tried setting foo.symbol_means using
>
> foo.symbol_means = 'tu' setting symbol_means
>
> using the symbol command (symbol_means = symbol(locations, means, 'tu', target = 'foo') and even
>
> foo = symbol_means(locations, means, 'tu') (where 'foo' is the name of the original graphic object).
>
>
>
> Most of the time the command was accepted but nothing changed in the plot. Any tips? Surely there's a quick solution.
>
>
>
> Thanks!
>
>
>
> Laura H.
Hi Laura,
That symbol_means actually returns a Symbol object, which you can then manipulate. For example:
b = boxplot(...)
s = b.symbol_means
print, s ; prints out all the properties
s.symbol = "tu"
This assumes that you have set the mean_values keyword when you created the box plot.
Cheers,
Chris
|
|
|
Re: Changing the symbol, color, etc., of "mean" indicator in box plots [message #88484 is a reply to message #88473] |
Thu, 01 May 2014 12:22   |
laura.hike
Messages: 87 Registered: September 2013
|
Member |
|
|
On Wednesday, April 30, 2014 9:04:05 PM UTC-7, Chris Torrence wrote:
> On Wednesday, April 30, 2014 4:54:46 PM UTC-6, laura...@gmail.com wrote:
>
>> Can anyone give me syntax for changing the symbol used to indicate the mean in box and whisker plots made using BOXPLOT? This is the first time I've used the new graphics methods and obviously I'm missing something.
>
>>
>
>>
>
>>
>
>> http://www.exelisvis.fr/docs/boxplot.html tells me to "use this graphic symbol (SYMBOL_MEANS) to control all of the symbol properties for the mean values, if specified. See SYMBOL for more information," but I really don't understand what's said on
>
>>
>
>>
>
>>
>
>> http://www.exelisvis.fr/docs/symbol.html
>
>>
>
>>
>
>>
>
>> I tried setting foo.symbol_means using
>
>>
>
>> foo.symbol_means = 'tu' setting symbol_means
>
>>
>
>> using the symbol command (symbol_means = symbol(locations, means, 'tu', target = 'foo') and even
>
>>
>
>> foo = symbol_means(locations, means, 'tu') (where 'foo' is the name of the original graphic object).
>
>>
>
>>
>
>>
>
>> Most of the time the command was accepted but nothing changed in the plot. Any tips? Surely there's a quick solution.
>
>>
>
>>
>
>>
>
>> Thanks!
>
>>
>
>>
>
>>
>
>> Laura H.
>
>
>
> Hi Laura,
>
>
>
> That symbol_means actually returns a Symbol object, which you can then manipulate. For example:
>
>
>
> b = boxplot(...)
>
> s = b.symbol_means
>
> print, s ; prints out all the properties
>
> s.symbol = "tu"
>
>
>
> This assumes that you have set the mean_values keyword when you created the box plot.
>
>
>
> Cheers,
>
> Chris
Great, thanks! I assume I can also use these commands within a program. Having interactive graphics is nice for establishing layouts!
|
|
|
Re: Changing the symbol, color, etc., of "mean" indicator in box plots [message #88485 is a reply to message #88484] |
Thu, 01 May 2014 12:37   |
laura.hike
Messages: 87 Registered: September 2013
|
Member |
|
|
I suppose there isn't a way to make all the changes in one statement, like
s = SYMBOL(0.5, 0.5, '*', SYM_COLOR='Blue', SYM_SIZE=2, $
SYM_THICK=3, /NORMAL, LABEL_STRING='My annotation')
because the symbols were already created in the BOXPLOT command?
|
|
|
Re: Changing the symbol, color, etc., of "mean" indicator in box plots [message #88490 is a reply to message #88485] |
Thu, 01 May 2014 17:32  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Thursday, May 1, 2014 1:37:11 PM UTC-6, laura...@gmail.com wrote:
> I suppose there isn't a way to make all the changes in one statement, like
>
>
>
> s = SYMBOL(0.5, 0.5, '*', SYM_COLOR='Blue', SYM_SIZE=2, $
>
> SYM_THICK=3, /NORMAL, LABEL_STRING='My annotation')
>
>
>
> because the symbols were already created in the BOXPLOT command?
Well, you can get the object and then call ::SetProperty:
s = b.symbol_means
s.SetProperty, SYM_COLOR='Blue', SYM_SIZE=2, $
SYM_THICK=3, /NORMAL, LABEL_STRING='My annotation'
-Chris
|
|
|