Python plotly.graph_objs.XAxis() Examples
The following are 2
code examples of plotly.graph_objs.XAxis().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
plotly.graph_objs
, or try the search function
.
Example #1
Source File: kendall_triangles.py From lddmm-ot with MIT License | 5 votes |
def setup_layout(self) : "Setup the axis properties." axis = dict( showbackground=True, backgroundcolor='rgb(230, 230, 230)', gridcolor='rgb(255, 255, 255)', zerolinecolor='rgb(255, 255, 255)' ) xaxis = axis.copy() xaxis['range'] = [-1.1,1.1] yaxis = axis.copy() yaxis['range'] = [-1.1,1.1] zaxis = axis.copy() zaxis['range'] = [-1.1,1.1] aspectratio=dict(x=1, y=1, z=1) self.layout = go.Layout( title='Kendall Triangles', width='100%', height= 800, scene=go.Scene( xaxis=go.XAxis(xaxis), yaxis=go.YAxis(yaxis), zaxis=go.ZAxis(zaxis), aspectratio=dict( x=aspectratio['x'], y=aspectratio['y'], z=aspectratio['z']), ) )
Example #2
Source File: anim3D.py From lddmm-ot with MIT License | 4 votes |
def show(self, title): figs = [] for ind_f in range(len(self.frames)) : (points, triangles, signals) = self.frames[ind_f] points = array(points) triangles = array(triangles) signals = array(signals) signals_per_triangle = list( (signals[triangles[i,0]] + signals[triangles[i,1]] + signals[triangles[i,2]]) / 3 for i in range(triangles.shape[0]) ) signals_per_triangle[0] += 0.001 # Validate colormap my_colormap = FF._validate_colors("Portland", 'tuple') newdata = FF._trisurf(x=points[:,2], y=points[:,0], z=points[:,1], colormap=my_colormap, simplices=triangles, color_func = signals_per_triangle, plot_edges=False, edges_color = 'rgb(50, 50, 50)', show_colorbar = False, data_list = True) figs += newdata axis = dict( showbackground=True, backgroundcolor='rgb(230, 230, 230)', gridcolor='rgb(255, 255, 255)', zerolinecolor='rgb(255, 255, 255)' ) xaxis = axis.copy() xaxis['range'] = [-0.08,0.09] yaxis = axis.copy() yaxis['range'] = [-0.11,0.05] zaxis = axis.copy() zaxis['range'] = [0.02,0.18] aspectratio=dict(x=1, y=1, z=1) layout = graph_objs.Layout( title=title, width='100%', height= 800, scene=graph_objs.Scene( xaxis=graph_objs.XAxis(xaxis), yaxis=graph_objs.YAxis(yaxis), zaxis=graph_objs.ZAxis(zaxis), aspectratio=dict( x=aspectratio['x'], y=aspectratio['y'], z=aspectratio['z']), ) ) return my_iplot(graph_objs.Figure( data = figs, layout=layout))