Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
added raise condition and grouped Tick constructor parameters#26037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
598c989
f501bd7
17e9351
9c20a79
ad0a71b
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,6 +5,7 @@ | ||
import datetime | ||
import functools | ||
import logging | ||
import warnings | ||
from numbers import Real | ||
import numpy as np | ||
@@ -57,26 +58,12 @@ | ||
""" | ||
def __init__( | ||
self, axes, loc, *, | ||
size=None, width=None, color=None, major=True, pad=None, zorder=None, # global | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. The size in points info must stay. I'd have a slight preference to keep the one-parameter-per-line format and reorder in there:
But that's personal taste and not a blocker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I agree about the size in points comment staying. | ||
tickdir=None, tick1On=True, tick2On=True, # tick prop | ||
labelsize=None, labelcolor=None, labelrotation=0, # label prop | ||
timhoffm marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
labelfontfamily=None, label1On=True, label2On=False, # label prop | ||
grid_color=None, grid_linestyle=None, grid_linewidth=None, # grid prop | ||
grid_alpha=None, gridOn=None, # grid prop | ||
**kwargs, # Other Line2D kwargs applied to gridlines. | ||
): | ||
""" | ||
@@ -154,6 +141,13 @@ | ||
grid_alpha = mpl.rcParams["grid.alpha"] | ||
grid_kw = {k[5:]: v for k, v in kwargs.items()} | ||
remaining_kwargs = { | ||
k: v for k, v in kwargs.items() if not k.startswith('grid_')} | ||
if remaining_kwargs: | ||
warnings.warn( | ||
f"Invalid kwargs (not starting with 'grid_'):{remaining_kwargs.keys()}" | ||
) | ||
self.tick1line = mlines.Line2D( | ||
[], [], | ||
color=color, linestyle="none", zorder=zorder, visible=tick1On, | ||