import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(13, 13))
ax1 = plt.subplot( projection='polar')
ax1.set_theta_zero_location('N')
ax1.set_thetagrids(np.arange(0.0, 360.0, 25.7143))# /14
ax1.set_rgrids(np.arange(0.8,1,))
amount1 = [('89','c'),'04','76',('93','a'),'56',
'11','45','61','85',('37','b'),
'51','97','24','07']
r = 0.8
#theta = 25.7143 * range(14) # amount1:add to intersections
plt.show()
chart make in photoshop.
I am a newbie with python.
I am a foreigner, and my question is expressed through code and graphics
2
Answers
Include a color for all of the labels.
You can specify the text coordinates in (theta, r) coordinates. The angle should be in radians
To calculate the angles for
set_thetagrids
, you can usenp.linspace
from0
to360
with14
steps but withendpoint=False
.The angles for the placement are in radians;
np.radians(thetas)
converts them. To place the texts, you can loop throughamount1
. A little circle can be positioned e.g. viaax1.scatter(x, y, ...)
with a given interior and edge color.