내가 완전히 당신의 질문을 이해하는지 모르겠지만 어쨌든 (plot_surface 및 음모를 사용하여) 매끄러운, 부분적으로 임의의 표면과 완전히 무작위로 한 (ar = f (theta, phi)).
plotly 버전 (표시의 순서) :
# PLOTLY VERSION - DYNAMIC PLOTTING
import plotly
import plotly.plotly as py
from plotly.graph_objs import *
data = Data([ Surface(x=x, y=y, z=z) ])
fig = Figure(data=data)
py.iplot(fig, filename='bloch-sphere-surface')
다음
는
import scipy.signal as scsi
import numpy
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# FIRST WAY: make just a strange sphere (it works even if not continuous) - it seems a nice vase
theta = linspace(0,2*pi,100)
phi = linspace(0,pi,100) + scsi.savgol_filter(numpy.random.normal(1.5,0.5, 100),11,2)
r = scsi.savgol_filter(numpy.random.normal(2,0.2,theta.shape[0]),11,3)
# N.B. you can use the savgol_filter to 'fit' a presupposed random noise
# SECOND WAY: this is instead flat random
theta = numpy.random.uniform(0,pi, 100)
phi = numpy.random.uniform(0, pi, 100)
# this would be your r = f(theta, phi)
r = theta*2 + phi # random function
x = r*outer(cos(theta),sin(phi))
y = r*outer(sin(theta),sin(phi))
z = r*outer(ones(100),cos(phi))
# plotting (std)
fig = plt.figure(figsize=(10,10))
ax = fig.gca(projection='3d')
ax.plot_surface(x,y,z, alpha=0.1)
plt.draw()
plt.show()
(코드에서 제시된 순서) 개의 '방식'에 대한 표준 출력이다
지금까지 파이썬에서 무엇을 시도해 봤습니까? 어떤 모듈을 사용하고 있습니까? 입력 데이터의 예를 들려 줄 수 있습니까? –
지금까지 파이썬의 plot_surface()와 Mayavi의 mesh()를 시도해 보았습니다.하지만 둘 다 일반 그리드에서만 작동합니다. –
2D 폴라 플롯을 할 수있는 옵션이 될까요? http://matplotlib.org/examples/pylab_examples/polar_demo.html이 예제를 확인 했습니까? http://stackoverflow.com/questions/25236026/circular-interpolated-heat-map-plot-using-python –