@@ -760,7 +760,7 @@ def _checks(item, defaults):
760
760
# Default inset key-values
761
761
if insets :
762
762
INSET_defaults = dict (
763
- cell = (0 , 0 ),
763
+ cell = (1 , 1 ),
764
764
is_3d = False ,
765
765
l = 0.0 ,
766
766
w = 'to_end' ,
@@ -793,71 +793,71 @@ def _checks(item, defaults):
793
793
794
794
# Function handling logic around 2d axis labels
795
795
# Returns 'x{}' | 'y{}'
796
- def _get_label (x_or_y , row , col , cnt , shared_axes ):
796
+ def _get_label (x_or_y , r , c , cnt , shared_axes ):
797
797
# Default label (given strictly by cnt)
798
798
label = "{x_or_y}{cnt}" .format (x_or_y = x_or_y , cnt = cnt )
799
799
800
800
if isinstance (shared_axes , bool ):
801
801
if shared_axes :
802
802
if x_or_y == 'x' :
803
- label = "{x_or_y}{c}" .format (x_or_y = x_or_y , c = col + 1 )
803
+ label = "{x_or_y}{c}" .format (x_or_y = x_or_y , c = c + 1 )
804
804
if x_or_y == 'y' :
805
- label = "{x_or_y}{r}" .format (x_or_y = x_or_y , r = row + 1 )
805
+ label = "{x_or_y}{r}" .format (x_or_y = x_or_y , r = r + 1 )
806
806
807
807
if isinstance (shared_axes , list ):
808
808
if isinstance (shared_axes [0 ], tuple ):
809
809
shared_axes = [shared_axes ] # TODO put this elsewhere
810
810
for shared_axis in shared_axes :
811
- if (row , col ) in shared_axis :
811
+ if (r + 1 , c + 1 ) in shared_axis :
812
812
label = {
813
- 'x' : "x{0}" .format (shared_axis [0 ][1 ]+ 1 ),
814
- 'y' : "y{0}" .format (shared_axis [0 ][0 ]+ 1 )
813
+ 'x' : "x{0}" .format (shared_axis [0 ][1 ]),
814
+ 'y' : "y{0}" .format (shared_axis [0 ][0 ])
815
815
}[x_or_y ]
816
816
817
817
return label
818
818
819
819
# Function handling logic around 2d axis anchors
820
820
# Return 'x{}' | 'y{}' | 'free' | False
821
- def _get_anchors (row , col , x_cnt , y_cnt , shared_xaxes , shared_yaxes ):
821
+ def _get_anchors (r , c , x_cnt , y_cnt , shared_xaxes , shared_yaxes ):
822
822
# Default anchors (give strictly by cnt)
823
823
x_anchor = "y{y_cnt}" .format (y_cnt = y_cnt )
824
824
y_anchor = "x{x_cnt}" .format (x_cnt = x_cnt )
825
825
826
826
if isinstance (shared_xaxes , bool ):
827
827
if shared_xaxes :
828
- if row == 0 :
829
- x_anchor = "y{col_cnt}" .format (col_cnt = col + 1 )
828
+ if r == 0 :
829
+ x_anchor = "y{col_cnt}" .format (col_cnt = c + 1 )
830
830
else :
831
831
x_anchor = False
832
832
y_anchor = 'free'
833
- if shared_yaxes and col > 0 : # TODO covers all cases?
833
+ if shared_yaxes and c > 0 : # TODO covers all cases?
834
834
y_anchor = False
835
835
return x_anchor , y_anchor
836
836
837
837
elif isinstance (shared_xaxes , list ):
838
838
if isinstance (shared_xaxes [0 ], tuple ):
839
839
shared_xaxes = [shared_xaxes ] # TODO put this elsewhere
840
840
for shared_xaxis in shared_xaxes :
841
- if (row , col ) in shared_xaxis [1 :]:
841
+ if (r + 1 , c + 1 ) in shared_xaxis [1 :]:
842
842
x_anchor = False
843
843
y_anchor = 'free' # TODO covers all cases?
844
844
845
845
if isinstance (shared_yaxes , bool ):
846
846
if shared_yaxes :
847
- if col == 0 :
848
- y_anchor = "x{row_cnt}" .format (row_cnt = row + 1 )
847
+ if c == 0 :
848
+ y_anchor = "x{row_cnt}" .format (row_cnt = r + 1 )
849
849
else :
850
850
y_anchor = False
851
851
x_anchor = 'free'
852
- if shared_xaxes and row > 0 : # TODO covers all cases?
852
+ if shared_xaxes and r > 0 : # TODO covers all cases?
853
853
x_anchor = False
854
854
return x_anchor , y_anchor
855
855
856
856
elif isinstance (shared_yaxes , list ):
857
857
if isinstance (shared_yaxes [0 ], tuple ):
858
858
shared_yaxes = [shared_yaxes ] # TODO put this elsewhere
859
859
for shared_yaxis in shared_yaxes :
860
- if (row , col ) in shared_yaxis [1 :]:
860
+ if (r + 1 , c + 1 ) in shared_yaxis [1 :]:
861
861
y_anchor = False
862
862
x_anchor = 'free' # TODO covers all cases?
863
863
0 commit comments