-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ref #1100 , tickmode set to invalid value in mpltools #1101
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -453,13 +453,13 @@ def prep_ticks(ax, index, ax_type, props): | |
else: | ||
axis_dict['tick0'] = tick0 | ||
axis_dict['dtick'] = dtick | ||
axis_dict['tickmode'] = False | ||
axis_dict['tickmode'] = None | ||
elif scale == 'log': | ||
try: | ||
axis_dict['tick0'] = props['axes'][index]['tickvalues'][0] | ||
axis_dict['dtick'] = props['axes'][index]['tickvalues'][1] - \ | ||
props['axes'][index]['tickvalues'][0] | ||
axis_dict['tickmode'] = False | ||
axis_dict['tickmode'] = None | ||
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. Seems like this should be tick mode of 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. This is a matplotlib log example: and brings the warnings:
With |
||
except (IndexError, TypeError): | ||
axis_dict = dict(nticks=props['axes'][index]['nticks']) | ||
base = axis.get_transform().base | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to be explicit here and use
'auto'
rather thanNone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maybe help me to understand what is going on? Are you trying to catch the axis scaling properties {“linear”, “log”, “symlog”, “logit”} from matplotlib.axes.Axes.set_xscale (other axis respectively)? There is no
auto
option. MaybeNone
is treated as auto?It seems like despite the
tickmode
is set toNone
, it is inferred later on, for example the parsed JSON shows:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, i chose
None
in the first place because of the code snippetaxis_dict.pop('tickmode', None)
in line 491.