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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample
importnumpyasnpimportpandasaspdimportmatplotlib.pyplotaspltimportmatplotlibasmplax= (pd.DataFrame(np.random.randn(100, 2), columns=['A','B'])
.plot.scatter(
x='A',
y='B',
xlabel='my x label',
ylabel='my y label',
)
)
Problem description
In #34223 (released in 1.1.0), the ability to set xlabel and ylabel in DataFrame.plot() was added. This works fine when calling plot() directly or df.plot.line(). When calling df.plot.scatter() with these args, you still get the index labels as the axis labels, instead of the strings you pass in.
These args are not documented to be incompatible or unavailable on this function, and no error is printed.
Expected Output
The plot's axis labels should be the strings provided, "my x label" and "my y label".
charlesdong1991
changed the title
BUG: xlabel and ylabel have no effect on DataFrame.plot.scatter()
VIS: Allow xlabel and ylabel in DataFrame.plot.scatter plot and hexbin plot
Oct 9, 2020
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample
Problem description
In #34223 (released in 1.1.0), the ability to set
xlabel
andylabel
inDataFrame.plot()
was added. This works fine when callingplot()
directly ordf.plot.line()
. When callingdf.plot.scatter()
with these args, you still get the index labels as the axis labels, instead of the strings you pass in.These args are not documented to be incompatible or unavailable on this function, and no error is printed.
Expected Output
The plot's axis labels should be the strings provided, "my x label" and "my y label".
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: