LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy plot

Solved!
Go to solution

Hi, (I use LV 8.2.1)

 

I want to adjust the bounds of a graph (as a picture) to the size of the picture that is bounded at the front panel.

(the user may change the size of the picture).

I was expecting the VI attached to this message to do it,

but for some reason there is a mismatch between the bounds of the picture to the bounds of the graph.

Change the picture size and then run the vi, and see that the graph size is bigger then the picture size.

 

I would also like to add pictures to the graph, in different positions with regard to the graph grid.

So I would like to find the transformation between the position in the picture to the coordinates of the graph.

(I can add a picture at a certain position in pixels, but I don't know the position of the grid of the graph in pixels,

maybe it will be enough to find the position of the origin?)

 

Sincerely Yours,

Amitai Abramson.

0 Kudos
Message 1 of 5
(3,090 Views)
Solution
Accepted by topic author aSquared

You're not accounting for the X scale in your dimensions. One could argue that the VIs that draw the graph are not accounting for it, so the programmer has to do it instead, but that's basically where it stands.

 

Is there a reason you're using the picture XY as opposed to a standard XY graph? You can still place pictures (back, front, or middle) on the standard XY graph. 

Message 2 of 5
(3,071 Views)

Hi smercurio_fc,

 

Thank you for your answer,

 

I haven't tried yet to add pictures to the standard XY graph.

I will try that.

 

Regarding the picture XY- 

Is there a designated VI that searches a specific pixel in a picture ? (with a specific RGB and...)

 

Amitai Abramson

0 Kudos
Message 3 of 5
(3,063 Views)
I'm not aware of a specific VI that will search a picture control for a pixel of a specific color. However, you can convert the picture to a pixmap using the Picture to Pixmap VI and you'll get an array which you can search.
0 Kudos
Message 4 of 5
(3,047 Views)

Thanks smercurio_fc,

 

I wasn't aware of the possibility to plot pictures in XY graph.

(I Haven't noticed the arrow showing more options at the bottum of the Property nodes of the XY graph...)

 

I was also assisted by the example 'graph plot area images.vi'

 

 

Amitai Abramson.

Message Edited by Amitai Abramson on 05-10-2009 01:21 AM
0 Kudos
Message 5 of 5
(2,982 Views)