ex-3: fix plot sphere but keep it hidden
It's ugly as sin since aspect=equal is still impossible in matplotlib 3.1 and later.
This commit is contained in:
parent
d8800f6c3b
commit
ffd1002d4c
23
ex-3/plot.py
23
ex-3/plot.py
@ -11,21 +11,20 @@ counts = counts.reshape(bins)
|
||||
|
||||
plt.rcParams['font.size'] = 15
|
||||
suptitle('Angular decay distribution')
|
||||
# subplot2grid((1, 3), (0, 0), colspan=2, aspect='equal')
|
||||
|
||||
#subplot2grid((1, 3), (0, 0), colspan=2, aspect='equal')
|
||||
xlabel(r'$\phi$ (radians)')
|
||||
ylabel(r'$\theta$ (radians)')
|
||||
pcolor(yedges[:bins[1]], xedges[::bins[1]], counts)
|
||||
norm = colorbar(fraction=0.023, pad=0.04).norm
|
||||
|
||||
#ax = subplot2grid((1, 3), (0, 2), projection='3d')
|
||||
#θ, φ = mgrid[0:pi:bins[0]*1j, 0:2*pi:bins[1]*1j]
|
||||
#x = 5 * sin(θ) * cos(φ)
|
||||
#y = 5 * sin(θ) * sin(φ)
|
||||
#z = 5 * cos(θ)
|
||||
#ax.plot_surface(
|
||||
# x, y, z, rstride=1, cstride=1,
|
||||
# facecolors=cm.viridis(norm(counts)))
|
||||
#axis('off')
|
||||
show()
|
||||
|
||||
# Ax = subplot2grid((1, 3), (0, 2), projection='3d')
|
||||
# Θ, φ = mgrid[0:pi:bins[0]*1j, 0:2*pi:bins[1]*1j]
|
||||
# X = 5 * sin(θ) * cos(φ)
|
||||
# Y = 5 * sin(θ) * sin(φ)
|
||||
# Z = 5 * cos(θ)
|
||||
# Ax.plot_surface(
|
||||
# x, y, z, rstride=1, cstride=1,
|
||||
# facecolors=cm.viridis(norm(counts)))
|
||||
# Axis('off')
|
||||
# show()
|
||||
|
Loading…
Reference in New Issue
Block a user