Skip to content

Commit

Permalink
Remove fixes with uncertainties
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Oct 26, 2022
1 parent 9968c96 commit d767bc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/data/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def assign(cls, dataset, new_data):
if k not in dataset.kdims:
continue
elif isinstance(v, xr.DataArray):
coords[k] = v.swap_dims(**{v.name: k})
coords[k] = v.rename(**{v.name: k})
continue
coord_vals = cls.coords(dataset, k)
if not coord_vals.ndim > 1 and np.all(coord_vals[1:] < coord_vals[:-1]):
Expand Down
6 changes: 3 additions & 3 deletions holoviews/operation/datashader.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ def _process(self, element, key=None):
if ds_version >= LooseVersion('0.14.0'):
agg_kwargs['line_width'] = self.p.line_width

agg = cvs.line(df, x.name, yagg, agg_fn, axis=1, **agg_kwargs).swap_dims(rename_dict)
agg = cvs.line(df, x.name, yagg, agg_fn, axis=1, **agg_kwargs).rename(rename_dict)
if xtype == "datetime":
agg[x.name] = (agg[x.name]/1e3).astype('datetime64[us]')

Expand Down Expand Up @@ -1159,7 +1159,7 @@ def _process(self, element, key=None):
if wireframe:
agg = cvs.line(segments, x=['x0', 'x1', 'x2', 'x0'],
y=['y0', 'y1', 'y2', 'y0'], axis=1,
agg=agg).swap_dims({'x': x.name, 'y': y.name})
agg=agg).rename({'x': x.name, 'y': y.name})
else:
interpolate = bool(self.p.interpolation)
agg = cvs.trimesh(pts, simplices, agg=agg,
Expand Down Expand Up @@ -1478,7 +1478,7 @@ def _process(self, element, key=None):
agg = cvs.line(data, **agg_kwargs)
elif isinstance(element, Points):
agg = cvs.points(data, **agg_kwargs)
agg = agg.swap_dims({'x': xdim.name, 'y': ydim.name})
agg = agg.rename({'x': xdim.name, 'y': ydim.name})

if agg.ndim == 2:
return self.p.element_type(agg, **params)
Expand Down
6 changes: 0 additions & 6 deletions holoviews/plotting/mpl/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,6 @@ def _compute_gridspec(self, layout):
if xinches and yinches:
self.handles['fig'].set_size_inches([xinches, yinches])

for ax in self.handles["fig"].get_axes():
# Remove previous axes because auto-removal of overlapping axes will
# be removed in matplotlib 3.8, and new axes is added with plt.subplot
# further down
ax.remove()

self.gs = gridspec.GridSpec(rows, cols,
width_ratios=wr_list,
height_ratios=hr_list,
Expand Down

0 comments on commit d767bc4

Please sign in to comment.