Skip to content

Commit

Permalink
Retain Element._plot_id on redim (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Feb 8, 2019
1 parent 8caa03e commit 02cf145
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions holoviews/core/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ def __call__(self, specs=None, **dimensions):
if self.mode != 'dynamic' and not matches:
return redimmed


kdims = self.replace_dimensions(parent.kdims, dimensions)
vdims = self.replace_dimensions(parent.vdims, dimensions)
zipped_dims = zip(parent.kdims+parent.vdims, kdims+vdims)
Expand All @@ -219,7 +218,12 @@ def __call__(self, specs=None, **dimensions):
data = parent.data
if renames:
data = parent.interface.redim(parent, renames)
return parent.clone(data, kdims=kdims, vdims=vdims)
clone = parent.clone(data, kdims=kdims, vdims=vdims)
if self.parent.dimensions(label='name') == clone.dimensions(label='name'):
# Ensure that plot_id is inherited as long as dimension
# name does not change
clone._plot_id = self.parent._plot_id
return clone

if self.mode != 'dynamic':
return redimmed.clone(kdims=kdims, vdims=vdims)
Expand Down

0 comments on commit 02cf145

Please sign in to comment.