Skip to content

Commit

Permalink
Deactivate hard-coded radius in SolarMACH to improve flexibility for …
Browse files Browse the repository at this point in the history
…varying r ranges
  • Loading branch information
jgieseler committed Jan 3, 2025
1 parent 541e622 commit 35cd247
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1632,12 +1632,17 @@ def legend_arrow(width, height, **_):
rlabels = ['1', str(np.round(rss, 2)), r'$10^1$', r'$10^2\ \mathrm{R}_{\odot}$ ']
ax.set_yticklabels(rlabels)

"""
# Deactivated by jgieseler (Jan 2025):
# Hard-coding this is not feasible because the r range can not be assumed. It might work for missions always within 1 AU, but one can't rely on that.
# Drawing a circle around the plot, because sometimes for unkown reason the plot boundary is not drawn.
# Here circle_radius corresponds to the boundary of the plot, and it was empirically found.
circle_radius = 9.35
"""

circle = plt.Circle((0., 0.),
circle_radius,
r_max - 0.01, # corresponding to classic plot, where set_rmax is set to "r_max + 0.3" and the circle is drawn at "r_max + 0.29"
transform=ax.transData._b,
edgecolor="k",
facecolor=None,
Expand Down

0 comments on commit 35cd247

Please sign in to comment.