@@ -254,27 +254,30 @@ def _update_spike_ranges(self, layout, *showspikes, force_update=False):
254
254
255
255
# Construct the update data
256
256
update_data = self ._construct_update_data (relayout_dict )
257
- if self ._print_verbose :
258
- self ._relayout_hist .append (layout )
259
- self ._relayout_hist .append (["showspikes-update" , len (update_data ) - 1 ])
260
- self ._relayout_hist .append ("-" * 30 )
261
-
262
- with self .batch_update ():
263
- # First update the layout (first item of update_data)
264
- if not force_update :
265
- self .layout .update (self ._parse_relayout (update_data [0 ]))
266
-
267
- # Also: Remove the showspikes from the layout, otherwise the autorange
268
- # will not work as intended (it will not be triggered again)
269
- # Note: this removal causes a second trigger of this method
270
- # which will go in the "else" part below.
271
- for xaxis_str in self ._xaxis_list :
272
- self .layout [xaxis_str ].pop ("showspikes" )
257
+ if not self ._is_no_update (update_data ):
258
+ if self ._print_verbose :
259
+ self ._relayout_hist .append (layout )
260
+ self ._relayout_hist .append (
261
+ ["showspikes-update" , len (update_data ) - 1 ]
262
+ )
263
+ self ._relayout_hist .append ("-" * 30 )
264
+
265
+ with self .batch_update ():
266
+ # First update the layout (first item of update_data)
267
+ if not force_update :
268
+ self .layout .update (self ._parse_relayout (update_data [0 ]))
269
+
270
+ # Also: Remove the showspikes from the layout, otherwise the autorange
271
+ # will not work as intended (it will not be triggered again)
272
+ # Note: this removal causes a second trigger of this method
273
+ # which will go in the "else" part below.
274
+ for xaxis_str in self ._xaxis_list :
275
+ self .layout [xaxis_str ].pop ("showspikes" )
273
276
274
- # Then, update the data
275
- for updated_trace in update_data [1 :]:
276
- trace_idx = updated_trace .pop ("index" )
277
- self .data [trace_idx ].update (updated_trace )
277
+ # Then, update the data
278
+ for updated_trace in update_data [1 :]:
279
+ trace_idx = updated_trace .pop ("index" )
280
+ self .data [trace_idx ].update (updated_trace )
278
281
elif self ._print_verbose :
279
282
self ._relayout_hist .append (["showspikes" , "initial call or showspikes" ])
280
283
self ._relayout_hist .append ("-" * 40 )
0 commit comments