python - Rotate theta=0 on matplotlib polar plot -


i have following example code:

import numpy np import matplotlib.pyplot plt import random  data_theta = range(10,171,10)  data_theta_rad = [] in data_theta:     data_theta_rad.append(float(i)*np.pi/180.0)  data_r = random.sample(range(70, 90), 17)  print data_theta print data_r  ax = plt.subplot(111, polar=true) ax.plot(data_theta_rad, data_r, color='r', linewidth=3) ax.set_rmax(95) # ax.set_rmin(70.0) ax.grid(true)  ax.set_title("example", va='bottom') plt.show() 

...which produces this: enter image description here

...but set theta=0 'west'. like:

enter image description here

any ideas how matplotlib (i made pic below in powerpoint) ?

simply use:

ax.set_theta_zero_location("w") 

more info in documentation of matplotlib.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -