how DataFrame.plot and Matpoltlib.plot are related

Viewed 23

The definition of DataFrame.plot in frame.pyi is as below, I am a little confused:

@property
def plot(self)->PlotAccessor:...
  1. When calling DataFrame.plot like plot(kind, x=..., y=...,), how will all these parameters be passed, caused the the plot function in the definition accepts no parameters other than itself
  2. The official document of Pandas shows a parameter list of DataFrame.plot, but I came across one example on the internet as plot(..., label="population",...), there is no label parameter in the parameter list, how does this work
  3. The comment in source code says DataFrame.plot will eventually call Matplotlib plot, how these two interface be related, I haven't found any clue in the source code
  4. What's the purpose of PlotAccessor class, how it work

Appreciate any answers, thanks in advance

0 Answers
Related