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

Home » Public Forums » archive » How to access properties of multiple plots in a function graphics window?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How to access properties of multiple plots in a function graphics window? [message #86471] Tue, 12 November 2013 09:22 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

I've got code something like the following in a procedure to plot
barplots of some stats in a 2x2 grid. A legend for the datasets is
created only for the first plot, i.e. b[0].

w = WINDOW()
b = OBJARR(n_plots)

FOR j = 0, n_plots-1 DO BEGIN
index = 0
FOR i = 0, n_datasets-1 DO BEGIN
b[j] = BARPLOT( x, y[*,i,j], $
NBARS=n_datasets, $
INDEX=index++, $
NAME = dataset_name[i], $
OVERPLOT = i, $
LAYOUT = [2,2,j+1], $
/CURRENT )
IF ( j EQ 0 ) THEN BEGIN
IF ( i EQ 0 ) THEN $
l = LEGEND( TARGET=b[j] ) $
ELSE $
l.Add, b[j]
ENDIF
ENDFOR
ENDFOR

Works great. And I return the WINDOW object reference, w, back to the
caller.

What I want to do is access w and modify the properties of the various
plots (e.g. font size, legend font size) via the "w" object reference.

But I can't find any info in the IDL help that will tell me what the
object property references should be.

For instance, if I have access to the object array "b" I can change the
font size of the second plot simply by doing:

b[1].font_size = 9

and colour of the title of the third plot by (from IDL documentation)

b[2].title.color = "blue"

But how do I do that via the WINDOW reference, "w"?

Each individual plot (the b[j]'s) has been added to the window graphic
via the "CURRENT" keyword, but what's the syntax for the accessing those
plots via the object reference?

I hope my description of what I want to do makes sense.

Thanks for any info.

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array into binary array
Next Topic: PSYM=10 + POLYFILL = ?

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

Current Time: Wed Oct 08 13:31:42 PDT 2025

Total time taken to generate the page: 0.00426 seconds