@@ -20,10 +20,6 @@ def _extend_axes_pad(value):
20
20
def _tick_only (ax , bottom_on , left_on ):
21
21
bottom_off = not bottom_on
22
22
left_off = not left_on
23
- # [l.set_visible(bottom_off) for l in ax.get_xticklabels()]
24
- # [l.set_visible(left_off) for l in ax.get_yticklabels()]
25
- # ax.xaxis.label.set_visible(bottom_off)
26
- # ax.yaxis.label.set_visible(left_off)
27
23
ax .axis ["bottom" ].toggle (ticklabels = bottom_off , label = bottom_off )
28
24
ax .axis ["left" ].toggle (ticklabels = left_off , label = left_off )
29
25
@@ -73,37 +69,14 @@ def _config_axes(self):
73
69
"""Make an axes patch and outline."""
74
70
ax = self
75
71
ax .set_navigate (False )
76
-
77
72
ax .axis [:].toggle (all = False )
78
73
b = self ._default_label_on
79
74
ax .axis [self .orientation ].toggle (all = b )
80
75
81
- # for axis in ax.axis.values():
82
- # axis.major_ticks.set_visible(False)
83
- # axis.minor_ticks.set_visible(False)
84
- # axis.major_ticklabels.set_visible(False)
85
- # axis.minor_ticklabels.set_visible(False)
86
- # axis.label.set_visible(False)
87
-
88
- # axis = ax.axis[self.orientation]
89
- # axis.major_ticks.set_visible(True)
90
- # axis.minor_ticks.set_visible(True)
91
-
92
- #axis.major_ticklabels.set_size(
93
- # int(axis.major_ticklabels.get_size()*.9))
94
- #axis.major_tick_pad = 3
95
-
96
- # axis.major_ticklabels.set_visible(b)
97
- # axis.minor_ticklabels.set_visible(b)
98
- # axis.label.set_visible(b)
99
-
100
76
def toggle_label (self , b ):
101
77
self ._default_label_on = b
102
78
axis = self .axis [self .orientation ]
103
79
axis .toggle (ticklabels = b , label = b )
104
- #axis.major_ticklabels.set_visible(b)
105
- #axis.minor_ticklabels.set_visible(b)
106
- #axis.label.set_visible(b)
107
80
108
81
109
82
class CbarAxes (CbarAxesBase , Axes ):
@@ -618,13 +591,11 @@ def _update_locators(self):
618
591
if (self ._colorbar_mode == "single" and
619
592
self ._colorbar_location in ('left' , 'bottom' )):
620
593
if self ._colorbar_location == "left" :
621
- #sz = Size.Fraction(Size.AxesX(self.axes_llc), self._nrows)
622
594
sz = Size .Fraction (self ._nrows , Size .AxesX (self .axes_llc ))
623
595
h .append (Size .from_any (self ._colorbar_size , sz ))
624
596
h .append (Size .from_any (self ._colorbar_pad , sz ))
625
597
locator = self ._divider .new_locator (nx = 0 , ny = 0 , ny1 = - 1 )
626
598
elif self ._colorbar_location == "bottom" :
627
- #sz = Size.Fraction(Size.AxesY(self.axes_llc), self._ncols)
628
599
sz = Size .Fraction (self ._ncols , Size .AxesY (self .axes_llc ))
629
600
v .append (Size .from_any (self ._colorbar_size , sz ))
630
601
v .append (Size .from_any (self ._colorbar_pad , sz ))
@@ -695,8 +666,6 @@ def _update_locators(self):
695
666
696
667
for i in range (self .ngrids ):
697
668
col , row = self ._get_col_row (i )
698
- #locator = self._divider.new_locator(nx=4*col,
699
- # ny=2*(self._nrows - row - 1))
700
669
locator = self ._divider .new_locator (nx = h_ax_pos [col ],
701
670
ny = v_ax_pos [self ._nrows - 1 - row ])
702
671
self .axes_all [i ].set_axes_locator (locator )
@@ -727,13 +696,11 @@ def _update_locators(self):
727
696
728
697
if self ._colorbar_mode == "single" :
729
698
if self ._colorbar_location == "right" :
730
- #sz = Size.Fraction(Size.AxesX(self.axes_llc), self._nrows)
731
699
sz = Size .Fraction (self ._nrows , Size .AxesX (self .axes_llc ))
732
700
h .append (Size .from_any (self ._colorbar_pad , sz ))
733
701
h .append (Size .from_any (self ._colorbar_size , sz ))
734
702
locator = self ._divider .new_locator (nx = - 2 , ny = 0 , ny1 = - 1 )
735
703
elif self ._colorbar_location == "top" :
736
- #sz = Size.Fraction(Size.AxesY(self.axes_llc), self._ncols)
737
704
sz = Size .Fraction (self ._ncols , Size .AxesY (self .axes_llc ))
738
705
v .append (Size .from_any (self ._colorbar_pad , sz ))
739
706
v .append (Size .from_any (self ._colorbar_size , sz ))
0 commit comments