LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add plots to XY graph programmatically

Greetings!
 
I am using LabVIEW 8.0.1 and am trying to add 1 to n plots to an XY-Graph programmatically. 
 
Anyone have any ideas?
 
Thanks.
 
Con
0 Kudos
Message 1 of 6
(3,818 Views)
Could you be a little more specific? After all, when you wire data to an XY graph you are doing it programmatically... Smiley Wink
0 Kudos
Message 2 of 6
(3,814 Views)
Well lets see...
 
I would like a user to be able to click a button within a running application that says "Add a point" and enter coordinates, then have this point get shown on an XY Graph. And allow the user to do this as many times as they want, to add as many individual points as they want.  These individual points would then correspond to individual plots on the XY Graph's Plot Legend.
 
The "Programmatically" part of my message above is meant to indicate a way to set this up in a wiring diagram such that a running executable can perform the desired function in question.
 
I hope that is a little clearer.
0 Kudos
Message 3 of 6
(3,809 Views)
The first part of your requirement can be done by simply adding to an array that is then sent to the XY graph. You can take a look at the attached VI as a starting point. Modify/extend as needed.

I don't think you want each point to map to its own individual plot, since that will get unwieldy quite quickly. If the user adds, say, 20 points, I don't think you really want them to have to deal with 20 different plots from the plots legend.
0 Kudos
Message 4 of 6
(3,803 Views)

Thanks for the info, however the vi is in 8.2 and I am using 8.0.1.

I am in the middle of trying an implementation using arrays. 

You wrote: I don't think you want each point to map to its own individual plot, since that will get unwieldy quite quickly. If the user adds, say, 20 points, I don't think you really want them to have to deal with 20 different plots from the plots legend.

That is what I am trying to do.  Even though it will be unwieldly as you mention.  I am trying to essentially map points (imagine GPS coordinates) onto a grid - there could be one or there could be many (read 25).

Thanks for you help.

0 Kudos
Message 5 of 6
(3,786 Views)
I resaved the VI for 8.0.

I really think you should reconsider your proposed interface. What's the difference if you have 20 different points on one plot as opposed to 1 point on 20 different plots? The result is the same visually on the graph, but the latter creates a ridiculuously large plot legend.
0 Kudos
Message 6 of 6
(3,777 Views)