LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
peos

Simple multiplot XY Graph

Status: New

I often have to make multiple plots on an XY Graph with common X-values. If it is only two plots, this is very simple (see example). Please expand this method to use many more plots.

 

IdeaExch.png

5 Comments
altenbach
Knight of NI

Interesting. I wasn't aware that "this works". Is this documented somewhere?

 

In the cases you show (where the x-values are spaced equally in x), a waveform graph is sufficient and uses much simpler data structures.

 

Besides, the xy graph already take a wealth of other data structures (array of point clusters, cluster of x and y array, arrrays of such clusters, complex arrays, cluster array of complex arrays etc.). Somehow your suggestion seems unnatural and does not intuitivley fit into the group. Please convince me otherwise.

peos
Member

No, my X-values are not equally spaced. At least not allways.

 

I am working with material testing, and often need this kind of graph. X-values might be deformation, load or temperature, and Y-values might be stress, displacement, strain, etc., allways as a function of the input parameter. Expanding the suggested metod will make it very easy to place XY-graphs in my programs. It will take less memory and be faster, since I don't have to duplicate X-values.

 

I am sure my suggestion is natural and intuitivley when plotting multiple responses against a common input value.

dthor
Active Participant

I wasn't aware that the "This works" case exists, but it actually does (2010). I was definitely happy to see that. 🙂

 

It makes sense that if (X, Y) and (X, Y1, Y2) are acceptable, then (X, Y1, Y2, Y3, ..., Yn) should work too. I don't know of any expandable LV node that you only add one extra element too, why should this be any different?

GregSands
Active Participant

I've never seen this format either - mind you, XY-graphs seem to have other capabilities (such as plotting complex numbers) that are not documented either.  I agree that if it works for two plots, it "should" work for more, and it does seem like a simple way of creating multiple XY-graphs, but I wonder if a better solution would be something like this:

XYPlot.png

where each element contains a single X value and an array of Y-values.

altenbach
Knight of NI

I really don't like that "giant cluster" idea. Too inflexible. (e.g. try to change the number of plots at runtime).

 

I have posted a much simpler alternative idea. See if you like it!

 

Even Simpler Multiplot XY graphs