Skip to content

Commit edd767c

Browse files
addisonlynchPingviinituutti
authored andcommitted
DOC: Fix visualization.rst flake8 issues (pandas-dev#24186)
1 parent 4aa02d7 commit edd767c

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

doc/source/visualization.rst

+28-27
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ libraries that go beyond the basics documented here.
2626
Basic Plotting: ``plot``
2727
------------------------
2828

29-
We will demonstrate the basics, see the :ref:`cookbook<cookbook.plotting>` for
29+
We will demonstrate the basics, see the :ref:`cookbook<cookbook.plotting>` for
3030
some advanced strategies.
3131

3232
The ``plot`` method on Series and DataFrame is just a simple wrapper around
@@ -87,7 +87,7 @@ You can plot one column versus another using the `x` and `y` keywords in
8787
8888
.. note::
8989

90-
For more formatting and styling options, see
90+
For more formatting and styling options, see
9191
:ref:`formatting <visualization.formatting>` below.
9292

9393
.. ipython:: python
@@ -129,7 +129,7 @@ You can also create these other plots using the methods ``DataFrame.plot.<kind>`
129129

130130
In [14]: df = pd.DataFrame()
131131

132-
In [15]: df.plot.<TAB>
132+
In [15]: df.plot.<TAB> # noqa: E225, E999
133133
df.plot.area df.plot.barh df.plot.density df.plot.hist df.plot.line df.plot.scatter
134134
df.plot.bar df.plot.box df.plot.hexbin df.plot.kde df.plot.pie
135135

@@ -163,7 +163,8 @@ For labeled, non-time series data, you may wish to produce a bar plot:
163163
plt.figure();
164164
165165
@savefig bar_plot_ex.png
166-
df.iloc[5].plot.bar(); plt.axhline(0, color='k')
166+
df.iloc[5].plot.bar()
167+
plt.axhline(0, color='k');
167168
168169
Calling a DataFrame's :meth:`plot.bar() <DataFrame.plot.bar>` method produces a multiple
169170
bar plot:
@@ -231,7 +232,7 @@ Histograms can be drawn by using the :meth:`DataFrame.plot.hist` and :meth:`Seri
231232
232233
plt.close('all')
233234
234-
A histogram can be stacked using ``stacked=True``. Bin size can be changed
235+
A histogram can be stacked using ``stacked=True``. Bin size can be changed
235236
using the ``bins`` keyword.
236237

237238
.. ipython:: python
@@ -246,8 +247,8 @@ using the ``bins`` keyword.
246247
247248
plt.close('all')
248249
249-
You can pass other keywords supported by matplotlib ``hist``. For example,
250-
horizontal and cumulative histograms can be drawn by
250+
You can pass other keywords supported by matplotlib ``hist``. For example,
251+
horizontal and cumulative histograms can be drawn by
251252
``orientation='horizontal'`` and ``cumulative=True``.
252253

253254
.. ipython:: python
@@ -477,7 +478,7 @@ keyword, will affect the output type as well:
477478
478479
plt.close('all')
479480
480-
The subplots above are split by the numeric columns first, then the value of
481+
The subplots above are split by the numeric columns first, then the value of
481482
the ``g`` column. Below the subplots are first split by the value of ``g``,
482483
then by the numeric columns.
483484

@@ -579,8 +580,8 @@ each point:
579580
580581
plt.close('all')
581582
582-
You can pass other keywords supported by matplotlib
583-
:meth:`scatter <matplotlib.axes.Axes.scatter>`. The example below shows a
583+
You can pass other keywords supported by matplotlib
584+
:meth:`scatter <matplotlib.axes.Axes.scatter>`. The example below shows a
584585
bubble chart using a column of the ``DataFrame`` as the bubble size.
585586

586587
.. ipython:: python
@@ -684,15 +685,15 @@ A ``ValueError`` will be raised if there are any negative values in your data.
684685
685686
plt.close('all')
686687
687-
For pie plots it's best to use square figures, i.e. a figure aspect ratio 1.
688-
You can create the figure with equal width and height, or force the aspect ratio
689-
to be equal after plotting by calling ``ax.set_aspect('equal')`` on the returned
688+
For pie plots it's best to use square figures, i.e. a figure aspect ratio 1.
689+
You can create the figure with equal width and height, or force the aspect ratio
690+
to be equal after plotting by calling ``ax.set_aspect('equal')`` on the returned
690691
``axes`` object.
691692

692-
Note that pie plot with :class:`DataFrame` requires that you either specify a
693-
target column by the ``y`` argument or ``subplots=True``. When ``y`` is
694-
specified, pie plot of selected column will be drawn. If ``subplots=True`` is
695-
specified, pie plots for each column are drawn as subplots. A legend will be
693+
Note that pie plot with :class:`DataFrame` requires that you either specify a
694+
target column by the ``y`` argument or ``subplots=True``. When ``y`` is
695+
specified, pie plot of selected column will be drawn. If ``subplots=True`` is
696+
specified, pie plots for each column are drawn as subplots. A legend will be
696697
drawn in each pie plots by default; specify ``legend=False`` to hide it.
697698

698699
.. ipython:: python
@@ -918,7 +919,7 @@ Lag Plot
918919
Lag plots are used to check if a data set or time series is random. Random
919920
data should not exhibit any structure in the lag plot. Non-random structure
920921
implies that the underlying data are not random. The ``lag`` argument may
921-
be passed, and when ``lag=1`` the plot is essentially ``data[:-1]`` vs.
922+
be passed, and when ``lag=1`` the plot is essentially ``data[:-1]`` vs.
922923
``data[1:]``.
923924

924925
.. ipython:: python
@@ -954,7 +955,7 @@ If time series is random, such autocorrelations should be near zero for any and
954955
all time-lag separations. If time series is non-random then one or more of the
955956
autocorrelations will be significantly non-zero. The horizontal lines displayed
956957
in the plot correspond to 95% and 99% confidence bands. The dashed line is 99%
957-
confidence band. See the
958+
confidence band. See the
958959
`Wikipedia entry <https://en.wikipedia.org/wiki/Correlogram>`__ for more about
959960
autocorrelation plots.
960961

@@ -1446,9 +1447,9 @@ Plotting with matplotlib table is now supported in :meth:`DataFrame.plot` and :
14461447
14471448
plt.close('all')
14481449
1449-
Also, you can pass a different :class:`DataFrame` or :class:`Series` to the
1450-
``table`` keyword. The data will be drawn as displayed in print method
1451-
(not transposed automatically). If required, it should be transposed manually
1450+
Also, you can pass a different :class:`DataFrame` or :class:`Series` to the
1451+
``table`` keyword. The data will be drawn as displayed in print method
1452+
(not transposed automatically). If required, it should be transposed manually
14521453
as seen in the example below.
14531454

14541455
.. ipython:: python
@@ -1463,9 +1464,9 @@ as seen in the example below.
14631464
14641465
plt.close('all')
14651466
1466-
There also exists a helper function ``pandas.plotting.table``, which creates a
1467-
table from :class:`DataFrame` or :class:`Series`, and adds it to an
1468-
``matplotlib.Axes`` instance. This function can accept keywords which the
1467+
There also exists a helper function ``pandas.plotting.table``, which creates a
1468+
table from :class:`DataFrame` or :class:`Series`, and adds it to an
1469+
``matplotlib.Axes`` instance. This function can accept keywords which the
14691470
matplotlib `table <http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.table>`__ has.
14701471

14711472
.. ipython:: python
@@ -1597,8 +1598,8 @@ Plotting directly with matplotlib
15971598

15981599
In some situations it may still be preferable or necessary to prepare plots
15991600
directly with matplotlib, for instance when a certain type of plot or
1600-
customization is not (yet) supported by pandas. ``Series`` and ``DataFrame``
1601-
objects behave like arrays and can therefore be passed directly to
1601+
customization is not (yet) supported by pandas. ``Series`` and ``DataFrame``
1602+
objects behave like arrays and can therefore be passed directly to
16021603
matplotlib functions without explicit casts.
16031604

16041605
pandas also automatically registers formatters and locators that recognize date

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ exclude =
8787
doc/source/options.rst
8888
doc/source/release.rst
8989
doc/source/reshaping.rst
90-
doc/source/visualization.rst
9190

9291

9392
[yapf]

0 commit comments

Comments
 (0)