You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was updating some stereonet subplots in Jupyter (that used to look fine) and after running the cell the degrees around the stereonets did not plot correctly as they used to. Instead of plotting around the edge of the stereonets, they plotted all around the frame of the four subplots. I then tried on a single stereonet and it was better, but the degrees were positioned quite far away from the edge of the stereonet and I could not adjust that position.
The text was updated successfully, but these errors were encountered:
I encountered exactly the same issue today, and I am using Spyder. The last time I used mplstereonet was in December 2020 and back then the error did not occur. Here is an example of the ticks and labels:
Ok, took me a while to figure out what was going on. I can suggest two workarounds to fix this issue:
If "ax" is your stereonet axis, add the line "ax._polar.set_position(ax.get_position())" before calling plt.show()
Downgrade matplotlib to version <3.4.0
mplstereonet makes a hidden polar axis within the stereonet axis as a bit of a kludge to add azimuth tick labels.
I think the issue is in mplstereonet/stereonet_axes.py line 291. Prior to matplotlib 3.4.0, fig.add_axes() used to detect if you were attempting to create Axes with the same keyword arguments as already-existing Axes in the current Figure, and if so, it would return the existing Axes. Now it will create a new axis. So changes to the size of the stereonet axis aren't matched by changes in the polar axis anymore. Workaround 1 manually matches any size changes that have occurred in the parent axis.
I was updating some stereonet subplots in Jupyter (that used to look fine) and after running the cell the degrees around the stereonets did not plot correctly as they used to. Instead of plotting around the edge of the stereonets, they plotted all around the frame of the four subplots. I then tried on a single stereonet and it was better, but the degrees were positioned quite far away from the edge of the stereonet and I could not adjust that position.
The text was updated successfully, but these errors were encountered: