LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i would like to change graph plot with mouse (examples ?)

hi,

i'am a beginner in LV and i need some help !

well, i have an array with data (ex x=1..10 y=15,16,24,..).
i would like to plot them on a graph and then change the points position.

- fisrt, with my mouse (dragging)

- second by changing values on the array. and that without stopping anything or pushing a bottom. I just want to change the values and then update the graph in real time.


thanks a lot for your help.

if you have examples or hints you can send them at this adress :
jean-jacques.parnet@steria.fr
0 Kudos
Message 1 of 3
(2,852 Views)
Drag and drop functionality is not currently very easy to implement in LabVIEW. The reason is that LabVIEW does not really have event driven programming. There is no way with a regular X-Y graph to know when the user is holding or not holding the mouse. The only control that does have this ability is the Picture control. With a Picture control, you can use a property node to get the current mouse state. You might try rigging something by either constructing an X,Y graph in a picture control, or by placing a picture control on top of an X,Y graph. This gets a little tricky because you have to be able to relate pixels to units, but it will allow you to respond to mouse clicks.

Another, and perhaps easier idea would be to create a new cursor for every po
int on your graph. You can then effectively drag and drop these. Wouldn't suggest doing this if you are going to have many, many points on your graph, but it should work fine for something like the graph in your attached picture.

Aaron Marks
National Instruments
0 Kudos
Message 2 of 3
(2,852 Views)
Just put 10 free cursors on a XY graph and pass the curve thru the cursors
locations.

Jean-Pierre Drolet

"jjparnet" a ecrit dans le message news:
5065000000080000000E2B0000-999158726000@exchange.ni.com...
> hi,
>
> i'am a beginner in LV and i need some help !
>
> well, i have an array with data (ex x=1..10 y=15,16,24,..).
> i would like to plot them on a graph and then change the points
> position.
>
> - fisrt, with my mouse (dragging)
>
> - second by changing values on the array. and that without stopping
> anything or pushing a bottom. I just want to change the values and
> then update the graph in real time.
>
>
> thanks a lot for your help.
>
> if you have examples or hints you can send them at this adress :
> jean-jacques.parnet@steria
.fr


LabVIEW, C'est LabVIEW

0 Kudos
Message 3 of 3
(2,852 Views)