LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create an XY Graph where X=type_string, Y=type_double?

Solved!
Go to solution

Hi,

 

I would like to plot measurement Y against serial number X.  Measurement Y is of type double, and the serial number is just a string.  When I bundle an array of X and an array of Y into a cluster, and try to feed it into the XY Graph icon on the block diagram, I get a broken wire.  I need the flexibility of plotting some numerical value against a string that I create.  This is possible in Excel, is it possible in LabVIEW 2009 SP1?  If so how?

 

17755i3B693D66D0745B62

 

Thanks,

Richard

 

0 Kudos
Message 1 of 5
(4,511 Views)
Solution
Accepted by topic author RichardBallantyne

This has come up several times before. No, the graphs do not support that. You basically need to cheat. See this post for an idea.

Message 2 of 5
(4,504 Views)

in LabVIEW charts and graphs are based on a cartesian system.  You need a magnitude (scalar number) for each dimention.  You can associate a scalar numeric value to each unique string (think- ring or enum controls or an array index) but you must have a magnitude for each dimention.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 5
(4,494 Views)

The solution that smercurio_fc linked will probably work for me -- thank you smercurio_fc.

 

To be honest, this solution is rather cludgey.  I wish NI would implement something more elegant by expanding the list of acceptable inputs to the XY Graph to include strings.

 

Thanks again,

Richard

 

0 Kudos
Message 4 of 5
(4,475 Views)

Then you should vote for the idea. Smiley Wink

0 Kudos
Message 5 of 5
(4,459 Views)