Closed syrte closed 1 year ago
Temporary workaround: Set minor ticks manually after calling ax.format,
ax.set_xticks(tick_list, minor=True)
Thanks for the report. Setting minor ticks after major ticks seems to work too:
fig, ax = pplt.subplot()
ax.format(xticks=[0, 0.5, 1], xticklabels=['a', 'b', 'c'])
ax.format(xminorticks=[0.1, 0.2])
This was due to a format()
convenience feature: By default, if you pass major ticks labels, minor ticks are disabled, since it's pretty rare that users need both and since proplot changes the default matplotlib style to include minor ticks. This makes the process of setting up manual tick labels take 1 step instead of 2.
However, this should clearly be disabled if a minorlocator
is passed in the same call. Fixed by https://github.com/proplot-dev/proplot/commit/a397f81746c6f4e1a97e605f3f6957ef7baeeec4.
Description
xticklabels overwrites xminorticks setting
Steps to reproduce
Expected behavior with minorticks
But I got this if setting
xticklabels
minorticks are gone...
Proplot version
Paste the results of
import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)
here. 3.4.3 0.9.5.post341