@@ -1135,9 +1135,9 @@ def __init__(self, data, x, y, **kwargs) -> None:
1135
1135
MPLPlot .__init__ (self , data , ** kwargs )
1136
1136
if x is None or y is None :
1137
1137
raise ValueError (self ._kind + " requires an x and y column" )
1138
- if is_integer (x ) and self .data .columns ._should_fallback_to_positional :
1138
+ if is_integer (x ) and not self .data .columns ._holds_integer () :
1139
1139
x = self .data .columns [x ]
1140
- if is_integer (y ) and self .data .columns ._should_fallback_to_positional :
1140
+ if is_integer (y ) and not self .data .columns ._holds_integer () :
1141
1141
y = self .data .columns [y ]
1142
1142
1143
1143
# Scatter plot allows to plot objects data
@@ -1194,7 +1194,7 @@ def __init__(self, data, x, y, s=None, c=None, **kwargs) -> None:
1194
1194
elif is_hashable (s ) and s in data .columns :
1195
1195
s = data [s ]
1196
1196
super ().__init__ (data , x , y , s = s , ** kwargs )
1197
- if is_integer (c ) and self .data .columns ._holds_integer ():
1197
+ if is_integer (c ) and not self .data .columns ._holds_integer ():
1198
1198
c = self .data .columns [c ]
1199
1199
self .c = c
1200
1200
@@ -1286,7 +1286,7 @@ def _kind(self) -> Literal["hexbin"]:
1286
1286
1287
1287
def __init__ (self , data , x , y , C = None , ** kwargs ) -> None :
1288
1288
super ().__init__ (data , x , y , ** kwargs )
1289
- if is_integer (C ) and self .data .columns ._holds_integer ():
1289
+ if is_integer (C ) and not self .data .columns ._holds_integer ():
1290
1290
C = self .data .columns [C ]
1291
1291
self .C = C
1292
1292
0 commit comments