取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 6 条)
7,679 次查看

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.

2 条消息(共 6 条)
7,676 次查看

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 项奖励
3 条消息(共 6 条)
7,660 次查看

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...

 

4 条消息(共 6 条)
7,649 次查看

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

0 项奖励
5 条消息(共 6 条)
7,642 次查看

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. 😉

6 条消息(共 6 条)
7,635 次查看