LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize x scales in multiple XY graphs?

I have multiple (3) XY plots, that logically share the some X axis. I'd like to somehow automatically link their x axes, so when i rescale (move) one plot, the other rescale with same max/min. The best solution would be if changing property of x scale raised an event. But, xy plot raises only basic events (mouse down, up ....), and it is very hard to do this task using only this basic events (BTW,  did someone ever use  this  elementary events on a litle sophistcated control?)
I don't want to have all the dataplots in one xy plot, becouse now I have 8 dataplots in 3 xy plots (3-3-2). and puting them together is not handy. 
Is there any chance to achieve this behavior using LW 7.1 ?
Thank you for your help
Peter

0 Kudos
Message 1 of 6
(4,499 Views)
I'm not sure I entirely understood your question, but is this what you were looking for?
0 Kudos
Message 2 of 6
(4,490 Views)

I'm sure there is a simpler solution, but I'm a bit tired...

You can pool the different X scale to find which one is different, then modify the others. Using reference numbers grouped in an array, you could easlily build a subvi to do the job.

Here is a start.

Chilly Charly    (aka CC)
0 Kudos
Message 3 of 6
(4,484 Views)
Thank you chilly charly ,
This was the hint I needed. In fact, the subvi can be made more isolated, with the only input for graphs reference array. There is no need to have the history record assuming only one plot changes X axis at the time (for number of plots >2, for 2 you need the history to decide, which one is the changed one).
Thank you for your help
0 Kudos
Message 4 of 6
(4,473 Views)

I know this is an old thread, but I wanted to share a cleaner way to do this. BTW: Kudo's on the vi Hlava, wouldn't have thought of it myself!

 

Attached you can find a vi that does the same thing but in a more obvious way (using an event case). The vi has been saved for LabVIEW 8.0.

Have fun with it ...

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 5 of 6
(4,072 Views)

Hlava do not have the glitches of the event method Smiley Tongue

0 Kudos
Message 6 of 6
(3,914 Views)