Version 8 (modified by alexey, 4 years ago) (diff) |
---|
plot3d field info
- plot3d support for the module.json
{ "role" : "output", "id" : "plotid", "label" : "3d plot", "type" : "plot3d", }
- the 3d plot is currently utilizing the javascript Plotly package https://plot.ly/javascript/
- example of .json output for plotting multiple (5) surfaces and (5 sets of) points on a single graph:
- note that this example (though comprehensive) does not cover all possible options of various fields; see below for full documentation
{ "layout" : { "scene": { "xaxis" : { "title" : "Theta (Deg)" }, "yaxis" : { "title" : "Phi (Deg)", "range" : [-179,180] }, "zaxis" : { "title" : "Rho" }, "camera": { "center" : { "x": 0, "y": 0, "z": 0 }, "eye" : { "x": 2, "y": 2, "z": 1 }, "up" : { "x": 0, "y": 0, "z": 1 } } }, "showlegend" : false, "autosize" : false, "width" : 650, "height" : 650, "margin": { "l": 0, "r": 0, "b": 50, "t": 50, "pad": 4 }, }, "data" : [ # surface plot 1: { "type" : "mesh3d", # type can be: "mesh3d", "surface" etc... "opacity" : 0.6, # in a range [0-1] "x" : vector_of_x, # [1,3,.5,7.5,...] "y" : vector_of_y, "z" : vector_of_z, "color" : surface_color }, # surface plot 2: { ..... }, # surface plot 3: { ..... }, # surface plot 4: { ..... }, # surface plot 5: { ..... }, # set of scatter3d points 1 { "type" : "scatter3d", "mode" : "markers", # mode types: "markers", "line".. "marker" : { "color" : color_of_markers, "size" : 2, "symbol" : "square", # can be "square", "circle", etc... "line" : { # a line enveloping 3dscatter "color" : "rgb(0,0,0)", "width" : 1.5 }, "opacity" : 1.0 }, "opacity" : .9, "x" : vector_of_x, "y" : vector_of_y, "z" : vector_of_z, "color" : scatter_color }, # set of scatter3d points 2 { .... }, # set of scatter3d points 3 { .... }, # set of scatter3d points 4 { .... }, # set of scatter3d points 5 { .... } ] }
- note that this example (though comprehensive) does not cover all possible options of various fields; see below for full documentation
- for full documentation and more examples see https://plot.ly/javascript/ (search for 3D plots):
- https://plot.ly/javascript/3d-surface-plots/ for surface plots
- https://plot.ly/javascript/3d-scatter-plots/ for scatter plots (dots, points of different shapes)
- https://plot.ly/javascript/3d-mesh/ for mesh plots
- https://plot.ly/javascript/3d-line-plots/ for line plots
- https://plot.ly/javascript/3d-point-clustering/ for cluster graphs
- https://plot.ly/javascript/3d-axes/ for control of layouts and axes
- https://plot.ly/javascript/3d-subplots/ for (multiple) subplots
Attachments (1)
- plot3d_1.png (93.5 KB) - added by alexey 4 years ago.
Download all attachments as: .zip