For my thesis I use the mplstereonet package to plot stereographic projections of points and planes obtained by using the ObsPy package. For my application I want to use azimuth labels that plot at a given angle outside of the circle. I am not using axis labels since they may overlap with possible data points in the centre of the circle.
The arguments of the set_azimuth_ticks function are:
- positions of ticks around the circle in degrees
- labels of ticks
- distance of ticks from the circle. 1 is on, 0.9 is inside and 1.1 is outside the circle.
This is the code I use alongside my result: I obtain this result:
As you can see the labels are way too far from the circle.
import mplstereonet
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8,8))
ax = fig.add_subplot(111, projection='stereonet')
ax.grid()
ax.set_azimuth_ticks([0],['N'], frac = 0.9)
I'm noticing a difference in behaviour between a python3.7 environment (which places the labels where I expect them) and a python 3.9 environment where they are too far out as the original poster observed. As a workaround, I am using this:
just to remove the unsightly, bizarrely far away labels.