Should scale changes respect previously explicitly set tickers and formatters? #18572
Labels
API: consistency
keep
Items to be ignored by the “Stale” Github Action
topic: transforms and scales
topic: units and array ducktypes
Bug report
Bug summary
Units (e.g. datetime) and scales (e.g. log) both come with their own default locators (various DateLocators, LogLocator) and formatters (various DateFormatters, LogFormatter), which are being set in
Axis._update_axisinfo
andAxis.set_scale
, respectively.If a locator or formatter has already been manually set on the axis, then setting units will not override the user-set locator/formatter -- this is tracked using the slighly awkwardly named
isDefault_{maj,min}{loc,fmt}
. On the other hand, setting a scale will override locator/formatters previously set.Code for reproduction
Actual outcome
Expected outcome
Consistent behavior between the two cases. #18571 (comment) is one where scales also respecting user-set locators/formatters would be nice, but I can also see an argument for the opposite behavior for simplicity...
Matplotlib version
print(matplotlib.get_backend())
): anyThe text was updated successfully, but these errors were encountered: