
Get to Know a Feature: 3D Path Plots
Created on August 30 at 11:48 am - by: admin
In the previous Gizmo Plot blog post I demonstrated some variations on the generic scatter plot. In this blog post I’ll use the same data set to illustrate variations on a 3D path plot. If you wish to create these Gizmo objects yourself, you should use the code from the Gizmo 3D Scatter Plot post to create the sample data.
Starting with a new Gizmo window add a path object to the Object List. Click Do It in the Path Properties dialog and proceed to add a new (default) axes object. Drag the two objects and drop them on the Display List (order does not matter) and you will see something like this:
Recall that the original data is derived from a Lissajous figure so I'd like to see the two ends of the path connected to each other. To accomplish that I append a row to data3D and set it equal to the first row:
InsertPoints 25,1, data3D data3D[25][]=data3D[0][q]
To improve the visibility of the path I'll add a line width attribute to the Attribute List.
To improve the visibility of the path I'll add a line width attribute to the Attribute List.
and then drag the attribute to the display list dropping it above path0 object.
The new line width attribute draws the path using a heavier line.
At this point I'd like to add a scatter object to highlight the location of the data points on the path. Following the same steps as in the previous post I add a scatter object that uses a custom blue sphere.
I can now take advantage of the spheres by replacing the path line with a 3D tube. The spheres are useful as they fill the tube's joints.
Note that the radius of the tube is equal to the radius of the spheres for a perfect fit.
Modifying the sphere color to match that of the tube and enhancing the plot gives us:
and increasing the number of data points to 100 gives us a smooth path.
In the next blog post I'll show you how to create a 3D path plot with arrows drawn in in the direction of the path.


Forum

Support

Gallery
Igor Pro 10
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More