@@ -7248,7 +7248,7 @@ def plot(self) -> PlotObject:
72487248
72497249 Simple line plot
72507250
7251- >>> arr.plot()
7251+ >>> arr.plot() # doctest: +SKIP
72527252 <Axes: xlabel='year'>
72537253
72547254 Line plot with grid and a title, saved in a file
@@ -7259,33 +7259,40 @@ def plot(self) -> PlotObject:
72597259 easier to compare. By default sub plots are independant of each other and the axes
72607260 ranges are computed to "fit" just the data for their individual plot.
72617261
7262- >>> arr.plot.bar(subplots='gender', sharey=True) # doctest: +SKIP
7262+ >>> arr.plot.bar(subplots='gender', sharey=True) # doctest: +SKIP
7263+ array([<Axes: title={'center': 'M'}, xlabel='year'>,
7264+ <Axes: title={'center': 'F'}, xlabel='year'>], dtype=object)
72637265
72647266 A stacked bar plot (genders are stacked)
72657267
7266- >>> arr.plot.bar(stack='gender')
7268+ >>> arr.plot.bar(stack='gender') # doctest: +SKIP
7269+ <Axes: xlabel='year'>
72677270
72687271 An animated bar chart (with two bars). We set explicit y bounds via ylim so that the
72697272 same boundaries are used for the whole animation.
72707273
7271- >>> arr.plot.bar(animate='year', ylim=(0, 22), filepath='myanim.avi') # doctest: +SKIP
7274+ >>> arr.plot.bar(animate='year', ylim=(0, 22), filepath='myanim.avi') # doctest: +SKIP
72727275
72737276 Create a figure containing 2 x 2 graphs
72747277
72757278 >>> import matplotlib.pyplot as plt
72767279 >>> # see matplotlib.pyplot.subplots documentation for more details
7277- >>> fig, ax = plt.subplots(2, 2, figsize=(10, 8), tight_layout=True) # doctest: +SKIP
7280+ >>> fig, ax = plt.subplots(2, 2, figsize=(10, 8), tight_layout=True) # doctest: +SKIP
72787281 >>> # line plot with 2 curves (Males and Females) in the top left corner (0, 0)
7279- >>> arr.plot(ax=ax[0, 0], title='line plot') # doctest: +SKIP
7282+ >>> arr.plot(ax=ax[0, 0], title='line plot') # doctest: +SKIP
7283+ <Axes: title={'center': 'line plot'}, xlabel='year'>
72807284 >>> # bar plot with stacked values in the top right corner (0, 1)
72817285 >>> arr.plot.bar(ax=ax[0, 1], stack='gender', title='stacked bar plot') # doctest: +SKIP
7286+ <Axes: title={'center': 'stacked bar plot'}, xlabel='year'>
72827287 >>> # area plot in the bottom left corner (1, 0)
7283- >>> arr.plot.area(ax=ax[1, 0], title='area plot') # doctest: +SKIP
7288+ >>> arr.plot.area(ax=ax[1, 0], title='area plot') # doctest: +SKIP
7289+ <Axes: title={'center': 'area plot'}, xlabel='year'>
72847290 >>> # scatter plot in the bottom right corner (1, 1), using the year as color
72857291 >>> # index and a specific colormap
72867292 >>> arr.plot.scatter(ax=ax[1, 1], x='M', y='F', c=arr.year, colormap='viridis',
7287- ... title='scatter plot') # doctest: +SKIP
7288- >>> plt.show() # doctest: +SKIP
7293+ ... title='scatter plot') # doctest: +SKIP
7294+ <Axes: title={'center': 'scatter plot'}, xlabel='M', ylabel='F'>
7295+ >>> plt.show() # doctest: +SKIP
72897296 """
72907297 return PlotObject (self )
72917298
0 commit comments