import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(777)
pi=np.pi
n=1000
ang=np.linspace(-pi,pi-2*pi/n,n)
r=2+np.sin(np.linspace(0,6*pi,n))
vx=r*np.cos(ang)
vy=r*np.sin(ang)
f=np.sin(np.linspace(0,3*pi,n))+np.random.normal(size=n,scale=0.1)
#f=np.sin(np.linspace(0,3*pi,n)) + Ebayesthresh 에서 만든 에러 
p=plt.figure(figsize=(12,4), dpi=200)  # Make figure object 

# 2. 
ax=p.add_subplot(1,1,1, projection='3d')
ax.grid(False)
ax.ticklabel_format(style='sci', axis='x',scilimits=(0,0))
ax.ticklabel_format(style='sci', axis='y',scilimits=(0,0))
ax.ticklabel_format(style='sci', axis='z',scilimits=(0,0))
top = f
bottom = np.zeros_like(top)
width=depth=0.05
ax.bar3d(vx, vy, bottom, width, depth, top, shade=False)
ax.set_xlim(-3,3)
ax.set_ylim(-3,3)
ax.set_zlim(-5,5)
(-5.0, 5.0)