@@ -3273,7 +3273,7 @@ def _perform_batch_animate(self, animation_opts):
3273
3273
3274
3274
# Exports
3275
3275
# -------
3276
- def to_dict (self , clone = True ):
3276
+ def to_dict (self ):
3277
3277
"""
3278
3278
Convert figure to a dictionary
3279
3279
@@ -3286,41 +3286,32 @@ def to_dict(self, clone=True):
3286
3286
"""
3287
3287
# Handle data
3288
3288
# -----------
3289
- if clone :
3290
- data = deepcopy (self ._data )
3291
- else :
3292
- data = self ._data
3289
+ data = deepcopy (self ._data )
3293
3290
3294
3291
# Handle layout
3295
3292
# -------------
3296
- if clone :
3297
- layout = deepcopy (self ._layout )
3298
- else :
3299
- layout = self ._layout
3293
+ layout = deepcopy (self ._layout )
3300
3294
3301
3295
# Handle frames
3302
3296
# -------------
3303
3297
# Frame key is only added if there are any frames
3304
3298
res = {"data" : data , "layout" : layout }
3305
- if clone :
3306
- frames = deepcopy ([frame ._props for frame in self ._frame_objs ])
3307
- else :
3308
- frames = [frame ._props for frame in self ._frame_objs ]
3299
+ frames = deepcopy ([frame ._props for frame in self ._frame_objs ])
3309
3300
3310
3301
if frames :
3311
3302
res ["frames" ] = frames
3312
3303
3313
3304
return res
3314
3305
3315
- def to_plotly_json (self , clone = True ):
3306
+ def to_plotly_json (self ):
3316
3307
"""
3317
3308
Convert figure to a JSON representation as a Python dict
3318
3309
3319
3310
Returns
3320
3311
-------
3321
3312
dict
3322
3313
"""
3323
- return self .to_dict (clone = clone )
3314
+ return self .to_dict ()
3324
3315
3325
3316
@staticmethod
3326
3317
def _to_ordered_dict (d , skip_uid = False ):
@@ -5550,18 +5541,15 @@ def on_change(self, callback, *args, **kwargs):
5550
5541
# -----------------
5551
5542
self ._change_callbacks [arg_tuples ].append (callback )
5552
5543
5553
- def to_plotly_json (self , clone = True ):
5544
+ def to_plotly_json (self ):
5554
5545
"""
5555
5546
Return plotly JSON representation of object as a Python dict
5556
5547
5557
5548
Returns
5558
5549
-------
5559
5550
dict
5560
5551
"""
5561
- if clone :
5562
- return deepcopy (self ._props if self ._props is not None else {})
5563
- else :
5564
- return self ._props if self ._props is not None else {}
5552
+ return deepcopy (self ._props if self ._props is not None else {})
5565
5553
5566
5554
@staticmethod
5567
5555
def _vals_equal (v1 , v2 ):
0 commit comments