QST: DataFrame.plot() vs Series.plot() have inconsistency wrt reuse plot #59716
Labels
API - Consistency
Internal Consistency of API/Behavior
Needs Discussion
Requires discussion from core team before further action
Usage Question
Visualization
plotting
Research
I have searched the [pandas] tag on StackOverflow for similar questions.
I have asked my usage related question on StackOverflow.
Link to question on StackOverflow
https://stackoverflow.com/questions/72375976/odd-behavior-of-plotting-in-pandas
Question about pandas
I had asked this question on SO some time ago but got no satisfactory answer.
Essentially the question (slightly improved wrt what i asked on SO) was, after having imported necessary packages:
why this code reuses the figure (so i end up with just one figure)
while this one does not (and i end up with two figures)
?
Then i debugged a little bit and noticed that this is caused by the following two lines
in the PlotAccessor.call in pandas/pandas/plotting/_core.py around line 990
Why do we need those two lines? What is the logic behind? Could we just remove them or set
kwargs["reuse_plot"]
always toTrue
? I do not see the reason for the inconsistency.The text was updated successfully, but these errors were encountered: