Skip to content

Commit 3456f38

Browse files
authored
Add outputs to example in what's new.
1 parent 29825d2 commit 3456f38

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

doc/users/next_whats_new/view_current_axis_format.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@ The new `~matplotlib.axis.Axis.get_tick_params` method can be used to
55
retrieve the appearance settings that will be applied to any
66
additional ticks, tick labels, and gridlines added to the plot:
77

8-
.. code-block:: python
8+
.. code-block:: pycon
99
10-
import matplotlib.pyplot as plt
10+
>>> import matplotlib.pyplot as plt
1111
12-
fig, ax = plt.subplots()
13-
ax.yaxis.set_tick_params(labelsize=30, labelcolor='red',
14-
direction='out', which='major')
15-
print(ax.yaxis.get_tick_params(which='major'))
16-
print(ax.yaxis.get_tick_params(which='minor'))
12+
>>> fig, ax = plt.subplots()
13+
>>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red',
14+
... direction='out', which='major')
15+
>>> ax.yaxis.get_tick_params(which='major')
16+
{'direction': 'out',
17+
'left': True,
18+
'right': False,
19+
'labelleft': True,
20+
'labelright': False,
21+
'gridOn': False,
22+
'labelsize': 30,
23+
'labelcolor': 'red'}
24+
>>> ax.yaxis.get_tick_params(which='minor')
25+
{'left': True,
26+
'right': False,
27+
'labelleft': True,
28+
'labelright': False,
29+
'gridOn': False}

0 commit comments

Comments
 (0)