LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Draw a Shape on Graph

Hi

 

I am trying to draw a shape which is very much like a  trapeziod on a graph.  This shape comes from specifications and I am trying to show that the data lie within the bound formed by this shape.  I can easily draw rectangle or square using the cursors, but drawing a triangle does not look straightforward to me. I can always plot any shape programmatically, which will appear on the graph while the VI runs.  But, I want this shape to be there all the time, just like cursors.  Can someone help?

 

Thanks

0 Kudos
Message 1 of 6
(6,257 Views)

Use the "plot images" property. It allows you to display anything (that you could also draw on an image indicator) on your graph. 

 

(Here's an old example that draws circles, also look at the examples quoted on the help page)

 

You could use three (triangle) or four (trapezoid) moveable cursor dots and redraw the shape when their position changes.

Message 2 of 6
(6,254 Views)

Thanks.   I like to know more about your last method.  I created 3 moveable cursor points, but how do I redraw the lines when their position changes?

 

Thanks

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

Here is a similar example.  You can click to create cursors and drag them around.

 

http://forums.ni.com/t5/LabVIEW/How-to-select-a-set-of-points-in-a-xy-graph-contained-in-an-area/m-p...

 

Message 4 of 6
(6,227 Views)

Thanks.  It is cool, but I am looking for something simple using the cursors.

0 Kudos
Message 5 of 6
(6,220 Views)

The can simplify Darin's code.

 

Remove all the logic to determine interior/exterior and reduce it to drawing the polygon when any of the cursors is moved. There won't be much code left. 😉

Message 6 of 6
(6,213 Views)