Skip to content

Commit 8d96ed2

Browse files
committed
Fix the indentations and keep an example with plot(kind=<kind>)
1 parent 9042526 commit 8d96ed2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

doc/source/visualization.rst

+13-6
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,16 @@ These include:
135135
* :ref:`'hexbin' <visualization.hexbin>` for hexagonal bin plots
136136
* :ref:`'pie' <visualization.pie>` for pie plots
137137

138-
.. versionadded:: 0.17
138+
For example, a bar plot can be created the following way:
139+
140+
.. ipython:: python
141+
142+
plt.figure();
143+
144+
@savefig bar_plot_ex.png
145+
df.ix[5].plot(kind='bar'); plt.axhline(0, color='k')
146+
147+
.. versionadded:: 0.17.0
139148

140149
You can also create these other plots using the methods ``DataFrame.plot.<kind>`` instead of providing the ``kind`` keyword argument. This makes it easier to discover plot methods and the specific arguments they use:
141150

@@ -592,11 +601,9 @@ It is recommended to specify ``color`` and ``label`` keywords to distinguish eac
592601

593602
.. ipython:: python
594603
595-
ax = df.plot.scatter(x='a', y='b',
596-
color='DarkBlue', label='Group 1');
604+
ax = df.plot.scatter(x='a', y='b', color='DarkBlue', label='Group 1');
597605
@savefig scatter_plot_repeated.png
598-
df.plot.scatter(x='c', y='d',
599-
color='DarkGreen', label='Group 2', ax=ax);
606+
df.plot.scatter(x='c', y='d', color='DarkGreen', label='Group 2', ax=ax);
600607
601608
.. ipython:: python
602609
:suppress:
@@ -782,7 +789,7 @@ Also, other keywords supported by :func:`matplotlib.pyplot.pie` can be used.
782789
783790
@savefig series_pie_plot_options.png
784791
series.plot.pie(labels=['AA', 'BB', 'CC', 'DD'], colors=['r', 'g', 'b', 'c'],
785-
autopct='%.2f', fontsize=20, figsize=(6, 6))
792+
autopct='%.2f', fontsize=20, figsize=(6, 6))
786793
787794
If you pass values whose sum total is less than 1.0, matplotlib draws a semicircle.
788795

0 commit comments

Comments
 (0)