Skip to content

Commit 87429a6

Browse files
authored
remove debug messages by adding semicolons (#37206)
1 parent 75a5fa7 commit 87429a6

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

doc/source/user_guide/visualization.rst

+28-28
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ On DataFrame, :meth:`~DataFrame.plot` is a convenience to plot all of the column
6464
6565
plt.figure();
6666
@savefig frame_plot_basic.png
67-
df.plot()
67+
df.plot();
6868
6969
You can plot one column versus another using the ``x`` and ``y`` keywords in
7070
:meth:`~DataFrame.plot`:
@@ -119,7 +119,7 @@ For example, a bar plot can be created the following way:
119119
plt.figure();
120120
121121
@savefig bar_plot_ex.png
122-
df.iloc[5].plot(kind="bar")
122+
df.iloc[5].plot(kind="bar");
123123
124124
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:
125125

@@ -180,7 +180,7 @@ bar plot:
180180
df2 = pd.DataFrame(np.random.rand(10, 4), columns=["a", "b", "c", "d"])
181181
182182
@savefig bar_plot_multi_ex.png
183-
df2.plot.bar()
183+
df2.plot.bar();
184184
185185
To produce a stacked bar plot, pass ``stacked=True``:
186186

@@ -193,7 +193,7 @@ To produce a stacked bar plot, pass ``stacked=True``:
193193
.. ipython:: python
194194
195195
@savefig bar_plot_stacked_ex.png
196-
df2.plot.bar(stacked=True)
196+
df2.plot.bar(stacked=True);
197197
198198
To get horizontal bar plots, use the ``barh`` method:
199199

@@ -206,7 +206,7 @@ To get horizontal bar plots, use the ``barh`` method:
206206
.. ipython:: python
207207
208208
@savefig barh_plot_stacked_ex.png
209-
df2.plot.barh(stacked=True)
209+
df2.plot.barh(stacked=True);
210210
211211
.. _visualization.hist:
212212

@@ -414,7 +414,7 @@ groupings. For instance,
414414
df = pd.DataFrame(np.random.rand(10, 2), columns=["Col1", "Col2"])
415415
df["X"] = pd.Series(["A", "A", "A", "A", "A", "B", "B", "B", "B", "B"])
416416
417-
plt.figure()
417+
plt.figure();
418418
419419
@savefig box_plot_ex2.png
420420
bp = df.boxplot(by="X")
@@ -518,7 +518,7 @@ When input data contains ``NaN``, it will be automatically filled by 0. If you w
518518
df = pd.DataFrame(np.random.rand(10, 4), columns=["a", "b", "c", "d"])
519519
520520
@savefig area_plot_stacked.png
521-
df.plot.area()
521+
df.plot.area();
522522
523523
To produce an unstacked plot, pass ``stacked=False``. Alpha value is set to 0.5 unless otherwise specified:
524524

@@ -531,7 +531,7 @@ To produce an unstacked plot, pass ``stacked=False``. Alpha value is set to 0.5
531531
.. ipython:: python
532532
533533
@savefig area_plot_unstacked.png
534-
df.plot.area(stacked=False)
534+
df.plot.area(stacked=False);
535535
536536
.. _visualization.scatter:
537537

@@ -554,7 +554,7 @@ These can be specified by the ``x`` and ``y`` keywords.
554554
df = pd.DataFrame(np.random.rand(50, 4), columns=["a", "b", "c", "d"])
555555
556556
@savefig scatter_plot.png
557-
df.plot.scatter(x="a", y="b")
557+
df.plot.scatter(x="a", y="b");
558558
559559
To plot multiple column groups in a single axes, repeat ``plot`` method specifying target ``ax``.
560560
It is recommended to specify ``color`` and ``label`` keywords to distinguish each groups.
@@ -563,7 +563,7 @@ It is recommended to specify ``color`` and ``label`` keywords to distinguish eac
563563
564564
ax = df.plot.scatter(x="a", y="b", color="DarkBlue", label="Group 1")
565565
@savefig scatter_plot_repeated.png
566-
df.plot.scatter(x="c", y="d", color="DarkGreen", label="Group 2", ax=ax)
566+
df.plot.scatter(x="c", y="d", color="DarkGreen", label="Group 2", ax=ax);
567567
568568
.. ipython:: python
569569
:suppress:
@@ -576,7 +576,7 @@ each point:
576576
.. ipython:: python
577577
578578
@savefig scatter_plot_colored.png
579-
df.plot.scatter(x="a", y="b", c="c", s=50)
579+
df.plot.scatter(x="a", y="b", c="c", s=50);
580580
581581
582582
.. ipython:: python
@@ -591,7 +591,7 @@ bubble chart using a column of the ``DataFrame`` as the bubble size.
591591
.. ipython:: python
592592
593593
@savefig scatter_plot_bubble.png
594-
df.plot.scatter(x="a", y="b", s=df["c"] * 200)
594+
df.plot.scatter(x="a", y="b", s=df["c"] * 200);
595595
596596
.. ipython:: python
597597
:suppress:
@@ -837,7 +837,7 @@ You can create a scatter plot matrix using the
837837
df = pd.DataFrame(np.random.randn(1000, 4), columns=["a", "b", "c", "d"])
838838
839839
@savefig scatter_matrix_kde.png
840-
scatter_matrix(df, alpha=0.2, figsize=(6, 6), diagonal="kde")
840+
scatter_matrix(df, alpha=0.2, figsize=(6, 6), diagonal="kde");
841841
842842
.. ipython:: python
843843
:suppress:
@@ -1086,7 +1086,7 @@ layout and formatting of the returned plot:
10861086
10871087
plt.figure();
10881088
@savefig series_plot_basic2.png
1089-
ts.plot(style="k--", label="Series")
1089+
ts.plot(style="k--", label="Series");
10901090
10911091
.. ipython:: python
10921092
:suppress:
@@ -1144,7 +1144,7 @@ it empty for ylabel.
11441144
df.plot();
11451145
11461146
@savefig plot_xlabel_ylabel.png
1147-
df.plot(xlabel="new x", ylabel="new y")
1147+
df.plot(xlabel="new x", ylabel="new y");
11481148
11491149
.. ipython:: python
11501150
:suppress:
@@ -1320,7 +1320,7 @@ with the ``subplots`` keyword:
13201320
.. ipython:: python
13211321
13221322
@savefig frame_plot_subplots.png
1323-
df.plot(subplots=True, figsize=(6, 6))
1323+
df.plot(subplots=True, figsize=(6, 6));
13241324
13251325
.. ipython:: python
13261326
:suppress:
@@ -1343,7 +1343,7 @@ or columns needed, given the other.
13431343
.. ipython:: python
13441344
13451345
@savefig frame_plot_subplots_layout.png
1346-
df.plot(subplots=True, layout=(2, 3), figsize=(6, 6), sharex=False)
1346+
df.plot(subplots=True, layout=(2, 3), figsize=(6, 6), sharex=False);
13471347
13481348
.. ipython:: python
13491349
:suppress:
@@ -1354,7 +1354,7 @@ The above example is identical to using:
13541354

13551355
.. ipython:: python
13561356
1357-
df.plot(subplots=True, layout=(2, -1), figsize=(6, 6), sharex=False)
1357+
df.plot(subplots=True, layout=(2, -1), figsize=(6, 6), sharex=False);
13581358
13591359
.. ipython:: python
13601360
:suppress:
@@ -1379,9 +1379,9 @@ otherwise you will see a warning.
13791379
target1 = [axes[0][0], axes[1][1], axes[2][2], axes[3][3]]
13801380
target2 = [axes[3][0], axes[2][1], axes[1][2], axes[0][3]]
13811381
1382-
df.plot(subplots=True, ax=target1, legend=False, sharex=False, sharey=False)
1382+
df.plot(subplots=True, ax=target1, legend=False, sharex=False, sharey=False);
13831383
@savefig frame_plot_subplots_multi_ax.png
1384-
(-df).plot(subplots=True, ax=target2, legend=False, sharex=False, sharey=False)
1384+
(-df).plot(subplots=True, ax=target2, legend=False, sharex=False, sharey=False);
13851385
13861386
.. ipython:: python
13871387
:suppress:
@@ -1409,15 +1409,15 @@ Another option is passing an ``ax`` argument to :meth:`Series.plot` to plot on a
14091409
14101410
fig, axes = plt.subplots(nrows=2, ncols=2)
14111411
plt.subplots_adjust(wspace=0.2, hspace=0.5)
1412-
df["A"].plot(ax=axes[0, 0])
1413-
axes[0, 0].set_title("A")
1414-
df["B"].plot(ax=axes[0, 1])
1415-
axes[0, 1].set_title("B")
1416-
df["C"].plot(ax=axes[1, 0])
1417-
axes[1, 0].set_title("C")
1418-
df["D"].plot(ax=axes[1, 1])
1412+
df["A"].plot(ax=axes[0, 0]);
1413+
axes[0, 0].set_title("A");
1414+
df["B"].plot(ax=axes[0, 1]);
1415+
axes[0, 1].set_title("B");
1416+
df["C"].plot(ax=axes[1, 0]);
1417+
axes[1, 0].set_title("C");
1418+
df["D"].plot(ax=axes[1, 1]);
14191419
@savefig series_plot_multi.png
1420-
axes[1, 1].set_title("D")
1420+
axes[1, 1].set_title("D");
14211421
14221422
.. ipython:: python
14231423
:suppress:

0 commit comments

Comments
 (0)