wiki:docs_plot3d

plot3d field info

  • plot3d support for the module.json
     {
         "role"            : "output",
         "id"              : "plotid",
         "label"           : "3d plot",
         "type"            : "plot3d"
     }
    
    
  • 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 for various fields; see below for complete 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
                    {
                       ....
                    }
                 ]
       } 
      
  • produced graph (with above example)

Last modified 2 weeks ago Last modified on Feb 10, 2018, 7:15:23 PM

Attachments (1)

Download all attachments as: .zip