本文整理汇总了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))