Jump to content

how to mark points on a 3D graph


Trin

Recommended Posts

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

Link to comment

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/ni/board/message?board.id=170&view=by_date_ascending&message.id=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

Link to comment

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:)

change read xyz.vi

Link to comment

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

Link to comment

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.

change read xyz.vi

3dgraph.llb

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.