Jump to content


Photo
- - - - -

how to mark points on a 3D graph


  • Please log in to reply
4 replies to this topic

#1 Trin

Trin

    More Active

  • Members
  • PipPip
  • 38 posts
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 April 2010 - 07:22 AM

Hi All,

I want to write a program which plots data on a surface graph then
allows the user to click on the graph and "mark" points on the plot. The
program should change the color of the "marked" points on the graph.

I wrote the attached code which uses "event structure" and cursors to do
the job. I used cursor to read the X,Y,Z position of the clicked point on
the plot and store them in arrays. These arrays then were feed into a
new plot added to the graph using CWPlots3D.Add() method. However, my
code does not draw the second plot (which would show marked points in
green) nor it does not get the marked points coordination correctly. I
appreciate your help to correct the code.

Thank you

#2 neBulus

neBulus

    LV Survivalist

  • Members
  • PipPipPipPipPipPip
  • 1,389 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 April 2010 - 12:25 PM

Hi All,

I want to write a program which plots data on a surface graph then
allows the user to click on the graph and "mark" points on the plot. The
program should change the color of the "marked" points on the graph.

I wrote the attached code which uses "event structure" and cursors to do
the job. I used cursor to read the X,Y,Z position of the clicked point on
the plot and store them in arrays. These arrays then were feed into a
new plot added to the graph using CWPlots3D.Add() method. However, my
code does not draw the second plot (which would show marked points in
green) nor it does not get the marked points coordination correctly. I
appreciate your help to correct the code.

Thank you



Starting at reply #7 in this thread on the NI site

http://forums.ni.com...=144155#M144155

you will find example code that demonstrates most of the functionality in the CW 3d graphs. Please read those posts and try out the code I posted.

It sounds like you are not redrawing the plot after you add the new points.

Ben

#3 Trin

Trin

    More Active

  • Members
  • PipPip
  • 38 posts
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 April 2010 - 03:39 PM

Starting at reply #7 in this thread on the NI site

http://forums.ni.com...=144155#M144155

you will find example code that demonstrates most of the functionality in the CW 3d graphs. Please read those posts and try out the code I posted.

It sounds like you are not redrawing the plot after you add the new points.

Ben



Hi Ben,
thanks for your reply, i examined the code that you had posted on that thread, and i tried to write this VI based on that code. but still i have got problems. i am trying to add the plot to my graph so i can see the marked points.I would appreciate any kind of suggestion since i am really stucked on this:)

Attached Files



#4 neBulus

neBulus

    LV Survivalist

  • Members
  • PipPipPipPipPipPip
  • 1,389 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 April 2010 - 03:54 PM

Hi Ben,
thanks for your reply, i examined the code that you had posted on that thread, and i tried to write this VI based on that code. but still i have got problems. i am trying to add the plot to my graph so i can see the marked points.I would appreciate any kind of suggestion since i am really stucked on this:)


Clean-up the diagram and add some comments so I don't have to work too hard to help.

Wire up your error clusters to makes ure there aren't obvious errors.

I never tried adding plots in parallel (always do them in seq).

Toss or include that sub-VI so we can try running it.

Ben

#5 Trin

Trin

    More Active

  • Members
  • PipPip
  • 38 posts
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

Posted 22 April 2010 - 08:09 AM

Clean-up the diagram and add some comments so I don't have to work too hard to help.

Wire up your error clusters to makes ure there aren't obvious errors.

I never tried adding plots in parallel (always do them in seq).

Toss or include that sub-VI so we can try running it.

Ben



Hi Ben,

thanks for your reply.I tried to clean it up as you said, but i should say i am really fresh with LabView.For creating the wave form i am using one of LabView's own example, i attach it as well.
as you can see when by clicking on the surface, the position's indicator shows one coord before, i think i need a mouse up event as well, but then i also have some problems with redrawing the plot.
again thanks for your help.

Attached Files