From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-30-2017 09:13 AM
Hey there,
I am quite new to LabView and haven't really found I was looking for so far.
In other languages like Matlab you can use a 1D Array of Numbers as X Values e.g. [1.4, 1.55, 1.9, 12].
If you then want to plot your Y Data you can use this array of XValues and assign it to them in the plot like:
plot(XArray, YArray).
LabView offers me the Property XScale Minimum, Maximum, Increment which is not what I need because I do not have linearly spaced X Values. From what I found so far I could accomplish what I need by passing my 1D Array of XValues to the XScale Marker Val property, but I haven't quite understood how I can manage to display the xvalues this way to see them in the displayed graph.
Thanks in advance for your help.
best,
Julian
Solved! Go to Solution.
03-30-2017 09:21 AM
03-30-2017 09:43 AM
Hi Gerd,
lets put it that way: We plot XY data, but on most occasions we have multiple sets of XY data that have to be displayed simultaneously in one plot. To implement that I merged the signals and fed it into a Waveform Chart or a Waveform Graph, what worked nicely.
Using a merged signal it gave me an error using a XY Graph - I did not really understood why it did not work with a merged signal since it is XY data - Maybe you can resolve this or propose the most suitable plot type.
best,
Julian
03-30-2017 09:57 AM - edited 03-30-2017 09:59 AM
Hi Julian,
the help for the XYGraph shows the most recommended datatypes expected by the graph:
- Usually you create one plot as cluster of (X array, Y array).
- When you need more than one plot: create an array of plots!
03-30-2017 10:05 AM - edited 03-30-2017 10:12 AM
Hi Gerd,
thanks very much for this advice! I made this work using the Build XY Graph function and an XY Graph.
I attached a picture of how I feed a merged signal into the Build XY Graph box. How do I accomplish what the Build XY Graph box makes using normal labview functions?
edit: Just found the XY Graph.vi in the examples! That solves my problem entirely !
best,
Julian