本文整理匯總了Python中plotly.graph_objs.YAxis方法的典型用法代碼示例。如果您正苦於以下問題:Python graph_objs.YAxis方法的具體用法?Python graph_objs.YAxis怎麽用?Python graph_objs.YAxis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類plotly.graph_objs
的用法示例。
在下文中一共展示了graph_objs.YAxis方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setup_layout
# 需要導入模塊: from plotly import graph_objs [as 別名]
# 或者: from plotly.graph_objs import YAxis [as 別名]
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']),
)
)
示例2: show
# 需要導入模塊: from plotly import graph_objs [as 別名]
# 或者: from plotly.graph_objs import YAxis [as 別名]
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))