當前位置: 首頁>>代碼示例>>Python>>正文


Python graph_objs.YAxis方法代碼示例

本文整理匯總了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']),
				)
			) 
開發者ID:jeanfeydy,項目名稱:lddmm-ot,代碼行數:31,代碼來源:kendall_triangles.py

示例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)) 
開發者ID:jeanfeydy,項目名稱:lddmm-ot,代碼行數:52,代碼來源:anim3D.py


注:本文中的plotly.graph_objs.YAxis方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。