LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically set data on secondary Y-axis

Solved!
Go to solution

I want to use property nodes and some other LV code to:

1. Create a secondary Y-axis

2. Take 3 1D arrays (t, f1(t),f2(t)) and use the t array for x values, with f1(t) on one axis as y values, and f2(t) on a secondary axis for more y values.

 

This was pretty easy with just one curve (just bundle the two 1d arrays and wire the cluster to a graph), but adding this secondary Y axis has proven difficult. Any help is appreciated!

0 Kudos
Message 1 of 5
(4,150 Views)

It is easier to help you if you would show what you've done.

 

Do you have problems forming the correct datatype for the second y values or are you trying to create a second Y scale and graph the second set of data there? What do you mean by "programmatically"?

 

XY graphs take a wide variery of data types. Did youread the help and looked at some of the example in the example finder? How about the yellow version here?

0 Kudos
Message 2 of 5
(4,105 Views)
Solution
Accepted by topic author ijustlovemath
You can't dynamically add and delete axes. They can only be added manually.

It sounds like you want an xy graph, which can support a number of data structures. The one I like the best is a cluster containing an array of x vales and an array of y values. If you want multiple plots on the came graph, just feed it with an array of these clusters.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,995 Views)

Mike, this is exactly what I was looking for! Thanks.

0 Kudos
Message 4 of 5
(3,941 Views)

You can add Y scales on edit mode (in the graph rigth click Y scale and duplicate Y scale) , and then HIDE/SHOW them with property nodes and asociate a plot to a scale.

0 Kudos
Message 5 of 5
(3,887 Views)