Jump to content

Plot auxiliary lines


Recommended Posts

I am in trouble with a multi plot graph. There is a wave chart, and I have to plot an auxiliary line when the user clicks over the graphic. I know how to get the initial point and the final point of the auxiliar line, I get the Y scale range and X absolute value, in other words, the X value of the place that I click. My doubt is in how can I plot this auxiliary line in the same graph? There is no problem if I have to use another labView object to do this task.

Any ideas, sugestions or examples?

Thank you in advance

Link to comment

QUOTE(torekp @ Apr 16 2007, 10:00 AM)

Find the NI example called Draw Graph with Events - what you're doing sounds similar.

It is not exactly what I need to do, because there is the necessity to plot many lines, not only one like in the example. Following the way of example, I got it, using the wave chart graph, but I need independent auxiliaries lines.

Any ideas?

Thank you.

Link to comment
  • 2 weeks later...

QUOTE(Gustavo @ Apr 16 2007, 01:32 PM)

It is not exactly what I need to do, because there is the necessity to plot many lines, not only one like in the example.

Here's what I did for a vaguely similar project. Have an XY graph on your front panel. On your block diagram, have an array of clusters. Each cluster contains 2 arrays, an array of X values and one of Y values. Each cluster of 2 arrays will become one line on the graph. You can have several lines be data acquired from hardware if you like, and several lines be user-defined by drawing on the graph as in the Draw Graph with Events example. Every time the users want to create a new "auxillary line" let them push a boolean button on the front panel. In your block diagram you respond by adding a new cluster of 2 empty arrays, which then get populated when users drag/click the mouse.

Make sense? If not, post what you've got and I'll try to modify it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.