当前位置: 首页>>代码示例>>Python>>正文


Python graph_objs.XAxis方法代码示例

本文整理汇总了Python中plotly.graph_objs.XAxis方法的典型用法代码示例。如果您正苦于以下问题:Python graph_objs.XAxis方法的具体用法?Python graph_objs.XAxis怎么用?Python graph_objs.XAxis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plotly.graph_objs的用法示例。


在下文中一共展示了graph_objs.XAxis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_layout

# 需要导入模块: from plotly import graph_objs [as 别名]
# 或者: from plotly.graph_objs import XAxis [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']),
				)
			) 
开发者ID:jeanfeydy,项目名称:lddmm-ot,代码行数:31,代码来源:kendall_triangles.py

示例2: show

# 需要导入模块: from plotly import graph_objs [as 别名]
# 或者: from plotly.graph_objs import XAxis [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)) 
开发者ID:jeanfeydy,项目名称:lddmm-ot,代码行数:52,代码来源:anim3D.py


注:本文中的plotly.graph_objs.XAxis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。