LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to select a subset of data directly on a graph using the mouse

Hi,

I'm trying to select a subset of data directly on a graph but I don't
want to use the cursors, I'm looking for something more like the window
zomming possibility, but without changing the graph itself. For instance
reading the zoom-window coordinates would be great. Is that possible ?
Thanks,

Frank.
0 Kudos
Message 1 of 5
(2,977 Views)
maybe you can use the mouse down and up events to figure out the area of the graph that has been "highlighted" then use the x-coords to determine which part of your array to strip out ...

i didnt put much thought into this but the idea might work...

Dan
0 Kudos
Message 2 of 5
(2,977 Views)
>dan
> maybe you can use the mouse down and up events to figure out the area
> of the graph that has been "highlighted" then use the x-coords to
> determine which part of your array to strip out ...

Hey Dan,
I tried that but could not find the mouse events when linked to a graph.
So I did it with an image. It works fine, but you can not have the image
placed behind the graph and detect mouse position. So the best I have so
far is an image the same size of the graph but on its side that I use as
a kind of "mouse pad". It works great but it's weird. Any other solution
is welcome.

Cheers.
0 Kudos
Message 3 of 5
(2,977 Views)
Never mind, I just found out about the transparent colour. So now the
image is on top of the graph, but transparent. It's perfect.
0 Kudos
Message 4 of 5
(2,977 Views)
well i should have been a bit more specific (i was in a hurry).. anyway the mouse events are actually VI events... you have to get the coords of your plot area nd filter for that etc...

you can use a picture control also i think...

good luck

Dan
0 Kudos
Message 5 of 5
(2,977 Views)