3D Streamtube Plots
A streamtube is a tubular region surrounded by streamlines that form a closed loop. It's a continuous version of a streamtube plot (3D quiver plot) and can provide insight into flow data from natural systems.
Try an Example
Before getting started with your own dataset, you can check out an example. First, select the 'Type' menu. Hovering the mouse over the chart type icon will display three options: 1) Charts like this by Plotly users 2) View tutorials on this chart type 3) See a basic example.
Clicking the 'See a basic example' option will show what a sample chart looks like after adding data and editing with the style. You'll also see what labels and style attributes were selected for this specific chart, as well as the end result.
You can also use the data featured in this tutorial by clicking on 'Open This Data in Chart Studio' on the left-hand side. It'll open in Chart Studio.
Add Data
Head to Plotly’s Chart Studio and add your data. You have the option of typing directly in the grid, uploading your file, or entering a URL of an online dataset. Chart Studio accepts .xls, .xlsx, or .csv files. For more information on how to enter your data, see this tutorial.
Create Chart
After adding data, go to the 'Traces' section under the 'Structure' menu on the left-hand side. Choose the 'Type' of trace, then choose 'Streamtube' under '3D' chart type.
Next, specify the vector field of the streamtube trace using the six attributes: 'X', 'Y', 'Z', 'U', 'V' and 'W' using their resepective dropdown menus. 'X', 'Y' and 'Z' are the vector position arrays that set the X, Y and Z coordinates of the vector field, while 'U', 'V' and 'W' are the vector component arrays that set the X, Y and Z components of the vector field respectively. Note that the tubes' starting positions, by default, will be cut from the vector field's X-Z plane at its minimum Y value. To specify your own starting position, use the attributes 'X Start', 'Y Start' and 'Z Start'.
Style Trace
The 'Style' menu displays many options to modify characteristics of the overall chart layout or the individual traces. To see more options about styling the chart, visit the style and layout section of the Chart Studio documentation.
Use the 'General' section under the 'Style' menu to set the plot title, as well as change the layout background, margin color and font styles.
To set the plot title, type the title text within the textbox provided under the 'Title' property.
Another approach is to click and then enter the title directly on the plot interface. The same can be done for the colorscale title.
To change the properties of the trace, go to the 'Traces' section under the 'Style' menu.
To change the color of the trace, click on the color panel on the right-side of the Colorscale
property and choose the scale type from the dropdown, followed by the desired colorscale as seen below.
Use the 'Color Bars' section under the 'Style' menu to change the properties of the color bar.
Save and Share
To save the plot click the 'Save' button on the left-hand side. A save modal will appear, as seen below, where you can specify the filenames and privacy settings for your plot and data grid.
For more information on privacy settings and how sharing works, visit Chart Studio's sharing tutorial.