Skip to content

Commit

Permalink
use deepcopy instead of .copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahclaude committed Apr 4, 2024
1 parent f335958 commit ab73f5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions figanos/matplotlib/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1526,11 +1526,11 @@ def scattermap(
if "row" not in plot_kw and "col" not in plot_kw:
use_attrs.setdefault("title", "description")

plot_kw_pop = copy.deepcopy(plot_kw) # copy plot_kw to modify and pop info in it

# extract plot_kw from dict if needed
if isinstance(data, dict) and plot_kw and list(data.keys())[0] in plot_kw.keys():
plot_kw = plot_kw[list(data.keys())[0]]

plot_kw_pop = plot_kw.copy() # copy plot_kw to modify and pop info in it
plot_kw_pop = plot_kw_pop[list(data.keys())[0]]

# figanos does not use xr.plot.scatter default markersize
if "markersize" in plot_kw.keys():
Expand Down

0 comments on commit ab73f5e

Please sign in to comment.