File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed
galleries/examples/axisartist Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 11"""
2- =======================
3- Simple Axis Direction01
4- =======================
2+ =====================
3+ Simple axis direction
4+ =====================
55
66"""
77import matplotlib .pyplot as plt
1313fig .subplots_adjust (right = 0.8 )
1414
1515ax1 .axis ["left" ].major_ticklabels .set_axis_direction ("top" )
16- ax1 .axis ["left" ].label .set_text ("Label " )
16+ ax1 .axis ["left" ].label .set_text ("Left label " )
1717
1818ax1 .axis ["right" ].label .set_visible (True )
19- ax1 .axis ["right" ].label .set_text ("Label " )
19+ ax1 .axis ["right" ].label .set_text ("Right label " )
2020ax1 .axis ["right" ].label .set_axis_direction ("left" )
2121
2222plt .show ()
Original file line number Diff line number Diff line change 11"""
2- =======================
3- Simple Axis Direction03
4- =======================
2+ ==========================================
3+ Simple axis tick label and tick directions
4+ ==========================================
55
6+ First subplot moves the tick labels to inside the spines.
7+ Second subplots moves the ticks to inside the spines.
8+ These effects can be obtained for a standard Axes by `~.Axes.tick_params`.
69"""
710
811import matplotlib .pyplot as plt
@@ -21,15 +24,15 @@ def setup_axes(fig, pos):
2124fig .subplots_adjust (wspace = 0.4 , bottom = 0.3 )
2225
2326ax1 = setup_axes (fig , 121 )
24- ax1 .set_xlabel ("X-label" )
25- ax1 .set_ylabel ("Y-label" )
27+ ax1 .set_xlabel ("ax1 X-label" )
28+ ax1 .set_ylabel ("ax1 Y-label" )
2629
2730ax1 .axis [:].invert_ticklabel_direction ()
2831
2932ax2 = setup_axes (fig , 122 )
30- ax2 .set_xlabel ("X-label" )
31- ax2 .set_ylabel ("Y-label" )
33+ ax2 .set_xlabel ("ax2 X-label" )
34+ ax2 .set_ylabel ("ax2 Y-label" )
3235
33- ax2 .axis [:].major_ticks .set_tick_out (True )
36+ ax2 .axis [:].major_ticks .set_tick_out (False )
3437
3538plt .show ()
You can’t perform that action at this time.
0 commit comments