You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try the example with an index other than [0, 1, 2] and you will see that your function will still get the values 0, 1, 2 because it does not get the DataFrame index at all. I don't think that this is an issue with pandas.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When using
ax.yaxis.set_major_formatter
with aFuncFormatter
, the function taking avalue
andpos
correctly receive the y-axis values asvalue
.When using an
ax.xaxis.set_major_formatter
, instead of getting the x-axis values, the function gets the index asvalue
.Expected Behavior
I'd expect the same behavior for both axis: the values get passed to
value
.This behavior is currently correct for the y-axis, but incorrect for the x-axis.
Installed Versions
INSTALLED VERSIONS
commit : 66e3805
python : 3.8.16.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.133+
Version : #1 SMP Fri Aug 26 08:44:51 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.5
numpy : 1.21.6
pytz : 2022.6
dateutil : 2.8.2
pip : 21.1.3
setuptools : 57.4.0
Cython : 0.29.32
pytest : 3.6.4
hypothesis : None
sphinx : 1.8.6
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.9.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 7.9.0
pandas_datareader: 0.9.0
bs4 : 4.6.3
bottleneck : None
fsspec : 2022.11.0
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : 2.8.4
odfpy : None
openpyxl : 3.0.10
pandas_gbq : 0.17.9
pyarrow : 9.0.0
pyxlsb : None
s3fs : None
scipy : 1.7.3
sqlalchemy : 1.4.45
tables : 3.7.0
tabulate : 0.8.10
xarray : 2022.12.0
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.56.4
The text was updated successfully, but these errors were encountered: