LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing a subplot function

Part of a program that I am currently writing requires the display of a large number (in the order of 30-40) graphs of previous recordings. I would like to have some sort of scaleable function such as the MATLAB subplot function to provide a flexible number of displayed graphs (i.e. the user can choose the number of rows and columns of historical graphs they require).

I have no problem with locating the graphs correctly, nor with resizing them according to the users requirements, however I can only get one graph to display at a time. Is there a way to instruct LabVIEW to create/destroy graphs in a window?

Alternatively, does anyone have suggestions as to alternative methods to generate such a subplot function?

Thanks
Ross
0 Kudos
Message 1 of 5
(3,633 Views)
RTFM. I assume you're talking about the XY graph here? The quick context
help window shows clearly how to package n separate graphs together to feed
an XY graph and get n separate lines. You simply feed the node an array of
graphs instead of a single graph.


rossmck wrote in message
news:50650000000800000089350000-1007855737000@exchange.ni.com...

> I have no problem with locating the graphs correctly, nor with
> resizing them according to the users requirements, however I can only
> get one graph to display at a time. Is there a way to instruct LabVIEW
> to create/destroy graphs in a window?
0 Kudos
Message 2 of 5
(3,633 Views)
Craig,

Thanks for the suggestion. Maybe I did not specify my problem clearly enough.

I was not talking about separate lines on the one graph. I was after being able to have an array (e.g. 3x10 or 4x10 sets of axes, but I would like the user to be able to select the dimensions of this axis array.

If I'm correct, what you're suggesting will only give me a whole series of lines on the one graph.

Cheers
Ross
0 Kudos
Message 3 of 5
(3,633 Views)
Ah. Easiest is to make a 2D array of XY plots. To do this, place an XY plot
inside a cluster and place that cluster inside the array. Set the cluster to
autosize. Create a property node of the XY graph and as the user changes the
number of plots use the "Plot Area->Plot Area Size" property to change the
size of the basic XY chart such that the array of graphs takes the same
amount of space regardless of how many are being plotted. You won't be able
to get an exact size match and I think you'll have to be happy with the
control size jumping a couple of pixels, but other than that it should be
fine.

If you're using LV6 you may find it's better to use the classic XY graph for
this, since it takes less space than the 3D one.


rossmck > wrote in message
news:506500000005000000FB530000-1007855737000@exchange.ni.com...
> Craig,
>
> Thanks for the suggestion. Maybe I did not specify my problem clearly
> enough.
>
> I was not talking about separate lines on the one graph. I was after
> being able to have an array (e.g. 3x10 or 4x10 sets of axes, but I
> would like the user to be able to select the dimensions of this axis
> array.
>
> If I'm correct, what you're suggesting will only give me a whole
> series of lines on the one graph.
>
> Cheers
> Ross
0 Kudos
Message 4 of 5
(3,633 Views)
Craig,

Thanks for your help on this... it is looking pretty good, but I can't get total control over the length and width of the plottable area. LabVIEW seems to maintain some residual control over the proportions of the graph (beyond the expected pixel quantisation). I can't seem to find any property nodes with appropriate toggles for keeping proportions or not. Do you have any ideas?

Thanks
Ross
0 Kudos
Message 5 of 5
(3,633 Views)