Skip to content

Commit ff6d8be

Browse files
authored
Merge pull request #12 from ran404/master
remove deepcopy calls
2 parents a25023d + 7e21b71 commit ff6d8be

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 arraystream
3+
Copyright (c) 2017 ArrayStream Technologies
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

weplot/figure.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import copy
21
import itertools
32

43
import plotly
@@ -118,7 +117,7 @@ def build_subplot(self, print_grid=True, **kwargs):
118117

119118
for idx, builder in enumerate(self.builders):
120119
spec = self.canvas.specs[idx]
121-
fig.append_trace(copy.deepcopy(builder.data), spec.r, spec.c)
120+
fig.append_trace(builder.data, spec.r, spec.c)
122121

123122
holder = FigureHolder(go.Figure(data=fig.data, layout=fig.layout))
124123
holder.update_layout(**self.layout)
@@ -129,7 +128,7 @@ def subplot(self, row=None, col=None, print_grid=True, **kwargs):
129128
if col is not None and row is not None:
130129
new_builder = FigureBuilder()
131130
new_builder.builders = self.builders
132-
new_builder.layout = copy.deepcopy(self.layout)
131+
new_builder.layout = self.layout
133132
new_builder.canvas = canvas_from_specs(itertools.product(range(1, row + 1), range(1, col + 1)))
134133
new_builder.build_subplot(print_grid=print_grid, **kwargs).plot()
135134
else:

0 commit comments

Comments
 (0)