Skip to content

Commit f9b541f

Browse files
authored
DOC: fixed labels in "Plotting with error bars" (#34884)
1 parent 23d1b02 commit f9b541f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/source/user_guide/visualization.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ Here is an example of one way to easily plot group means with standard deviation
14231423
# Plot
14241424
fig, ax = plt.subplots()
14251425
@savefig errorbar_example.png
1426-
means.plot.bar(yerr=errors, ax=ax, capsize=4)
1426+
means.plot.bar(yerr=errors, ax=ax, capsize=4, rot=0)
14271427
14281428
.. ipython:: python
14291429
:suppress:
@@ -1444,9 +1444,9 @@ Plotting with matplotlib table is now supported in :meth:`DataFrame.plot` and :
14441444
14451445
.. ipython:: python
14461446
1447-
fig, ax = plt.subplots(1, 1)
1447+
fig, ax = plt.subplots(1, 1, figsize=(7, 6.5))
14481448
df = pd.DataFrame(np.random.rand(5, 3), columns=['a', 'b', 'c'])
1449-
ax.get_xaxis().set_visible(False) # Hide Ticks
1449+
ax.xaxis.tick_top() # Display x-axis ticks on top.
14501450
14511451
@savefig line_plot_table_true.png
14521452
df.plot(table=True, ax=ax)
@@ -1463,8 +1463,9 @@ as seen in the example below.
14631463

14641464
.. ipython:: python
14651465
1466-
fig, ax = plt.subplots(1, 1)
1467-
ax.get_xaxis().set_visible(False) # Hide Ticks
1466+
fig, ax = plt.subplots(1, 1, figsize=(7, 6.75))
1467+
ax.xaxis.tick_top() # Display x-axis ticks on top.
1468+
14681469
@savefig line_plot_table_data.png
14691470
df.plot(table=np.round(df.T, 2), ax=ax)
14701471

0 commit comments

Comments
 (0)