Python 极坐标直方图-没有错误,但没有意义

Python 极坐标直方图-没有错误,但没有意义,python,matplotlib,histogram,python-3.6,polar-coordinates,Python,Matplotlib,Histogram,Python 3.6,Polar Coordinates,我没有得到任何错误,但直方图没有意义。酒吧根本没有居中。这是: ] 不久前,我做了一些类似的事情,但直方图几乎是正确的。从那以后情况变得更糟了。在这里: ] 我试过玩“宽度”、“底部”和D“对齐”,但没有解决任何问题 import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D Theta = np.linspace(0.0, 2.0*np.pi, 12) Dim = [2.

我没有得到任何错误,但直方图没有意义。酒吧根本没有居中。这是:

]

不久前,我做了一些类似的事情,但直方图几乎是正确的。从那以后情况变得更糟了。在这里:
]

我试过玩“宽度”、“底部”和D“对齐”,但没有解决任何问题

import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D

Theta = np.linspace(0.0, 2.0*np.pi, 12)
Dim = [2.31330, 2.32173, 2.32841, 2.32068, 2.31452, 2.30792, 2.31313, 2.31847, 2.31910, 2.31516, 2.30617, 2.30408]
width = (2*np.pi) / 13

ax1 = plt.subplot(111, polar=True)
bars = ax1.bar(Theta, Dim, color='b', width=width, bottom = 0.0, edgecolor = 'k', align = 'edge')
ax1.set_ylim(2.31000, 2.33000)
ax1.set_yticks(np.linspace(2.31000, 2.33000, 5))
ax1.set_rlabel_position(180)
ax1.set_theta_zero_location("N")
ax1.set_theta_direction(-1)

plt.show()

基本上我只需要这些条在0.0处相交,看起来像条,而不是这个。无论这是什么。

图形不会从0开始,但条形图会;所以他们被切断了。通过设置
bar
bottom
参数,可以让条形图从图形的中间开始

import matplotlib.pyplot as plt
import numpy as np

Theta = np.linspace(0.0, 2.0*np.pi, 12)
Dim = np.array([2.31330, 2.32173, 2.32841, 2.32068, 2.31452, 2.30792, 2.31313, 
                2.31847, 2.31910, 2.31516, 2.30617, 2.30408])
width = (2*np.pi) / 13
origin = 2.31

ax1 = plt.subplot(111, polar=True)

bars = ax1.bar(Theta, Dim-origin, color='b', width=width, bottom = origin, 
               edgecolor = 'k', align = 'edge')
ax1.set_ylim(origin, 2.33000)
ax1.set_yticks(np.linspace(2.31000, 2.33000, 5))
ax1.set_rlabel_position(180)
ax1.set_theta_zero_location("N")
ax1.set_theta_direction(-1)

plt.show()