05-04-2009 02:53 PM
Afternoon all,
I've finally gotten the handle of using 3D graph controls and am using them to plot the surface of a bearing. Feeding cylindrical coordinate arrays works fine for generating the plot I want. However, I would also like the the axis themselves to display in cylindrical coordinates rather than cartesian coordinates.
From the looks of things, there is no property available for CW 3D graphs that will allow me to change the coordinate display format. Does anyone know of a way to modify the display of the coordinate system to look more like that of a polar plot? Maybe superimpose a background image? Attached (in addition to the VI) is an image of what my plot looks like when I look just at the xy plane projection. Ideally, my axis display would look similar to the attached Matlab contour plot display.
I appreciate any input.
05-04-2009 02:54 PM
Here is a sample data set I use for the plot.
05-05-2009 06:02 PM
Hey jonvanjam-
I am sure that you, like me, have browed through all of the properties for the 3D Graph. To no avail, there doesn't seem to be a property that you can change to switch the axes representation from the grid to the polar coordinates in your example. There are some polar plot vi's that you may want to look into. You can find the vi that I am referring to at Functions»Programming»Graphics & Sound»Picture Plots»Polar Plot.vi. I am not sure if this vi applies to your particular application, but it is something to look into. You can find some examples for this vi in the Help»Find Examples example finder if you search for polar plots.
A nifty tool you may find helpful for continued use of the 3D Graph is the properties viewer. If you right-click on your front panel 3D graph and go to CWGraph3D»Properties... you can adjust your graph properties and directly see the changes impact in a sample image viewer. This allows you to more quickly adjust properties and see their affect on the graph.
I hope this helps.
-Ben
05-05-2009 07:03 PM
Hey Cho,
Thanks for the suggestions, though these are all things I eventually figured out on my own. It doesn't look I'll be able to really reuse the polar plot VI since it looks like I can't hide the magnitude displays and I can't specify the # of intervals to display degrees. Also, it looks like this VI was intended to be used to plot data. All I really want to do is superimpose my '2D' contour graph on a polar plot at the right position.
I'll have to resort to taking an image of the control (preferably with the plot centered and no axis labels) and then drawing circles and lines on this image at the right position
At least with this method I'll be able to customize the # of intervals (lines) I draw. Attached is an example of a plot I created.
For the 3D view I think I'll just paste a circular image (with a some type of marker/needle specifying angle 0) next to my plot. Then, I'll just take the longitudinal (or latitudinal?) value of my 3D plot and use that to rotate my image by the specified angle.