LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot a graph and reference lines

I am in trouble, trying to plot a graph with reference's lines.

I want to plot a geometric draw in the same graph that will receive a streaming data. This data is been received point (X,Y) by point.

I know how to plot the geometric that I will use as reference, and I know how I can plot the another graph using the data that is beed receiving by the data streaming. But I don't know how I can plot the graphs together.

Any ideias?

Thank you in advance.
0 Kudos
Message 1 of 9
(4,090 Views)

i would suggest this

Take two graphs

Fix/set  identical x and y axis range for both.

In front panel, super-impose one graph on the other, make the graph that's above/front invisible.

Now, keep your geometric reference lines on one graph and plot your acquired points on the other.

Hope this helps

regards

Dev

Message 2 of 9
(4,087 Views)
Is it possible to you show me an example?

Thank you in advance.

Gustavo
0 Kudos
Message 3 of 9
(4,084 Views)
Message 4 of 9
(4,082 Views)

some minute settings to be done, to display graphs in this manner

Select different plot colors on the visible and invisible graphs

hide  label, plot legent, x, y axis labels of one of them ( optional)

And as much as possible, try to keep the x axis and y axis same by not using auto scale x, y options 

If you have to change x, y axis, do so either programatically or by default setting identical scale values for both graphs

coz if you select  autoscaling, you may not be able to co-relate the super-imposed graphs at times

Message Edited by devchander on 05-16-2006 07:12 AM

0 Kudos
Message 5 of 9
(4,081 Views)
I got it! Thank you a lot. There is only one more thing that I still didn't know how to do.

How can I set the backgroud graph to transparent?


0 Kudos
Message 6 of 9
(4,073 Views)
I think that this is a much more straightforward way of doing it, that doesn't have the complication of two graphs...
 
Simply bundle the constant reference plot lines together with your other data into the one graph.
 
In the attached example, hacked out of a much more complex DAQ application of mine, I have a sub-VI (purely for tidyness) that generates the "two lines and a circle" reference guidlines in an array of clusters outside of the loop - this is then appended to the array of clusters of data and indicator point that is plotted.
 
See what you think.
 
Mark.
 
P.S. Run the VI - move the sliders to move the Lissajous figure - notice the "magnified centre indicator" changes from red to green when the Lissajous figure is centred.
Message 7 of 9
(4,066 Views)

The transperent color is chosen from tools palette>.color tool"'right click on front panel aftergetting color tool to get color palette

 on top right corner, select the small block with 't' in it, for coloring front panel objects as transperent

0 Kudos
Message 8 of 9
(4,048 Views)

Gustavo,

If the data that you want to plot/ reference data can be expressed in x and y parameters, then Mark's suggestion of using XY graph is ideal.

But, if the reference data that you have and the data that you intend to plot (against this reference) are as a 1D array, I feel my super-imposed plots should provide a simpler way.

Message Edited by devchander on 05-18-2006 06:50 AM

Message 9 of 9
(4,034 Views)