Skip to content

Conditionally add legend for horizon line#48

Merged
AdamRJensen merged 1 commit intomainfrom
AdamRJensen-patch-1
Apr 8, 2026
Merged

Conditionally add legend for horizon line#48
AdamRJensen merged 1 commit intomainfrom
AdamRJensen-patch-1

Conversation

@AdamRJensen
Copy link
Copy Markdown
Member

@AdamRJensen AdamRJensen commented Apr 8, 2026

Avoid the warning message due to the legend being added even when the horizon line is not available.

/usr/local/lib/python3.12/dist-packages/solarpy/plotting/multiplot.py:637: UserWarning: No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
  axes["sun1"].legend(loc="upper right", frameon=False)

@AdamRJensen AdamRJensen merged commit f58f3b8 into main Apr 8, 2026
19 checks passed
@AdamRJensen AdamRJensen deleted the AdamRJensen-patch-1 branch April 8, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant