My question is related to the following: Scatter polar plot in matlab
I tried looking online but couldn't find any with this axis; instead of the polar plot going 0 to 360 degrees how can I do -180 to 180 instead?
After creating the polar axis, you can simply set the ticks. Note that you have to set the ticks in radians and matplotlib will display in degrees.
Not quite sure how you want to deal the discrepancy at 180 and -180.
import matplotlib.pyplot as plt
fig, ax1 = plt.subplots(figsize=(6, 6), subplot_kw=dict(polar=True))
ax1.set_xticks(np.pi/180. * np.linspace(180, -180, 8, endpoint=False))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With