08-26-2009 11:43 AM
Today it is fun with the "XY Graph". This one involves advanced help searching skills, the context help is useful, but doesn't point you to detailed help in this case. Unlocking the power requires a bit of searching (or an awful lot of trial and error). Judging by the forums, lots of errors.
There are a lot of ways to get data into a Graph, not always with the results you anticipate. Any cool screenshots? No need to write a treatise on how you created it, a few tips perhaps, mostly to show that you can get a lot more out of this control than a white line plot on a black background.
Links to threads of interest are always welcome as well to jostle our memory.
08-26-2009
12:13 PM
- last edited on
12-02-2024
06:34 PM
by
Content Cleaner
I used an XY graph to "Measure the Diameter of a Pretzel"
Ben
09-01-2009 11:28 AM - edited 09-01-2009 11:30 AM
It is still not very well known that xy graphs accept complex data, in which case they graph IM vs. RE.
This often simplifies the code and data handling significantly, because instead of clusters we have a simple 1D CDB arrays. (discussed here)
Complex data makes rotations in the plane very easy, we simply need to change theta in the polar complex representation. See how simple the code for the drawing of an arbitrary ellipse becomes! (Try to rewrite the VI without using complex. You'll suddenly need quite a bit of trigonometry ;))
Ellipse2.vi (from here)
09-01-2009 12:04 PM - edited 09-01-2009 12:05 PM
Also note that the above ellipse2.vi is a bit clunky in the code because it does not use a complex graph (seems I linke to the wrong VI ;)).
For the rotation, we don't need to split the complex and reform it. All we need is a complex multiplication as shown here and graph the complex 1D array directly! 😄
Look ma, no clusters!