@@ -1255,12 +1255,8 @@ def _setup_scales(
1255
1255
except Exception as err :
1256
1256
raise PlotSpecError ._during ("Scale setup" , var ) from err
1257
1257
1258
- # Everything below here applies only to coordinate variables
1259
- # We additionally skip it when we're working with a value
1260
- # that is derived from a coordinate we've already processed.
1261
- # e.g., the Stat consumed y and added ymin/ymax. In that case,
1262
- # we've already setup the y scale and ymin/max are in scale space.
1263
1258
if axis is None or (var != coord and coord in p ._variables ):
1259
+ # Everything below here applies only to coordinate variables
1264
1260
continue
1265
1261
1266
1262
# Set up an empty series to receive the transformed values.
@@ -1280,13 +1276,15 @@ def _setup_scales(
1280
1276
1281
1277
for layer , new_series in zip (layers , transformed_data ):
1282
1278
layer_df = layer ["data" ].frame
1283
- if var in layer_df :
1284
- idx = self ._get_subplot_index (layer_df , view )
1285
- try :
1286
- new_series .loc [idx ] = view_scale (layer_df .loc [idx , var ])
1287
- except Exception as err :
1288
- spec_error = PlotSpecError ._during ("Scaling operation" , var )
1289
- raise spec_error from err
1279
+ if var not in layer_df :
1280
+ continue
1281
+
1282
+ idx = self ._get_subplot_index (layer_df , view )
1283
+ try :
1284
+ new_series .loc [idx ] = view_scale (layer_df .loc [idx , var ])
1285
+ except Exception as err :
1286
+ spec_error = PlotSpecError ._during ("Scaling operation" , var )
1287
+ raise spec_error from err
1290
1288
1291
1289
# Now the transformed data series are complete, set update the layer data
1292
1290
for layer , new_series in zip (layers , transformed_data ):
0 commit comments