Trin Posted April 21, 2010 Report Share Posted April 21, 2010 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 Quote Link to comment
Grampa_of_Oliva_n_Eden Posted April 21, 2010 Report Share Posted April 21, 2010 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 Quote Link to comment
Trin Posted April 21, 2010 Author Report Share Posted April 21, 2010 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 Quote Link to comment
Grampa_of_Oliva_n_Eden Posted April 21, 2010 Report Share Posted April 21, 2010 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 Quote Link to comment
Trin Posted April 22, 2010 Author Report Share Posted April 22, 2010 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.