-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added fixes for longitude wrapping when projecting Image #260
Conversation
34b3540
to
031765a
Compare
@@ -228,7 +228,7 @@ def _process_element(self, element): | |||
if np.all(X[0, 1:] < X[0, :-1]): | |||
X = X[:, ::-1] | |||
Y = element.interface.coords(element, 1, True, True, False) | |||
if np.all(Y[1:, 0] > X[:-1, 0]): | |||
if np.all(Y[1:, 0] < Y[:-1, 0]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Copy-paste error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yes.
Yes this fixes the problem 👍 but I am seeing two other breakages. Not sure if they are related: And when using unstacked.hvplot(x='x', y='y', width=400, height=400, datashade=True, cmap='Category10', colorbar=False) WARNING:root:dynamic_operation: Callable raised "TypeError("apply_groups() got multiple values for keyword argument 'options'",)".
Invoked as dynamic_operation(height=400, scale=1.0, width=400, x_range=None, y_range=None)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/jsignell/conda/envs/earthml/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude)
968 d['include'] = include
969 d['exclude'] = exclude
--> 970 return method(**d)
971 return None
972 else:
/Users/jsignell/holoviews/holoviews/core/dimension.py in _repr_mimebundle_(self, include, exclude)
1449 combined and returned.
1450 """
-> 1451 return Store.render(self)
1452
1453
/Users/jsignell/holoviews/holoviews/core/options.py in render(cls, obj)
1311 data, metadata = {}, {}
1312 for hook in hooks:
-> 1313 ret = hook(obj)
1314 if ret is None:
1315 continue
/Users/jsignell/holoviews/holoviews/ipython/display_hooks.py in pprint_display(obj)
270 if not ip.display_formatter.formatters['text/plain'].pprint:
271 return None
--> 272 return display(obj, raw_output=True)
273
274
/Users/jsignell/holoviews/holoviews/ipython/display_hooks.py in display(obj, raw_output, **kwargs)
246 elif isinstance(obj, (HoloMap, DynamicMap)):
247 with option_state(obj):
--> 248 output = map_display(obj)
249 elif isinstance(obj, Plot):
250 output = render(obj)
/Users/jsignell/holoviews/holoviews/ipython/display_hooks.py in wrapped(element)
140 try:
141 max_frames = OutputSettings.options['max_frames']
--> 142 mimebundle = fn(element, max_frames=max_frames)
143 if mimebundle is None:
144 return {}, {}
/Users/jsignell/holoviews/holoviews/ipython/display_hooks.py in map_display(vmap, max_frames)
200 return None
201
--> 202 return render(vmap)
203
204
/Users/jsignell/holoviews/holoviews/ipython/display_hooks.py in render(obj, **kwargs)
63 renderer = renderer.instance(fig='png')
64
---> 65 return renderer.components(obj, **kwargs)
66
67
/Users/jsignell/holoviews/holoviews/plotting/bokeh/renderer.py in components(self, obj, fmt, comm, **kwargs)
276 # Bokeh has to handle comms directly in <0.12.15
277 comm = False if bokeh_version < '0.12.15' else comm
--> 278 return super(BokehRenderer, self).components(obj,fmt, comm, **kwargs)
279
280
/Users/jsignell/holoviews/holoviews/plotting/renderer.py in components(self, obj, fmt, comm, **kwargs)
319 plot = obj
320 else:
--> 321 plot, fmt = self._validate(obj, fmt)
322
323 widget_id = None
/Users/jsignell/holoviews/holoviews/plotting/renderer.py in _validate(self, obj, fmt, **kwargs)
218 if isinstance(obj, tuple(self.widgets.values())):
219 return obj, 'html'
--> 220 plot = self.get_plot(obj, renderer=self, **kwargs)
221
222 fig_formats = self.mode_formats['fig'][self.mode]
/Users/jsignell/holoviews/holoviews/plotting/bokeh/renderer.py in get_plot(self_or_cls, obj, doc, renderer, **kwargs)
161 curdoc().theme = self_or_cls.theme
162 doc.theme = self_or_cls.theme
--> 163 plot = super(BokehRenderer, self_or_cls).get_plot(obj, renderer, **kwargs)
164 plot.document = doc
165 return plot
/Users/jsignell/holoviews/holoviews/plotting/renderer.py in get_plot(self_or_cls, obj, renderer, **kwargs)
184
185 # Initialize DynamicMaps with first data item
--> 186 initialize_dynamic(obj)
187
188 if not isinstance(obj, Plot):
/Users/jsignell/holoviews/holoviews/plotting/util.py in initialize_dynamic(obj)
246 continue
247 if not len(dmap):
--> 248 dmap[dmap._initial_key()]
249
250
/Users/jsignell/holoviews/holoviews/core/spaces.py in __getitem__(self, key)
1427 # Not a cross product and nothing cached so compute element.
1428 if cache is not None: return cache
-> 1429 val = self._execute_callback(*tuple_key)
1430 if data_slice:
1431 val = self._dataslice(val, data_slice)
/Users/jsignell/holoviews/holoviews/core/spaces.py in _execute_callback(self, *args)
1125
1126 with dynamicmap_memoization(self.callback, self.streams):
-> 1127 retval = self.callback(*args, **kwargs)
1128 return self._style(retval)
1129
/Users/jsignell/holoviews/holoviews/core/spaces.py in __call__(self, *args, **kwargs)
764
765 try:
--> 766 ret = self.callable(*args, **kwargs)
767 except KeyError:
768 # KeyError is caught separately because it is used to signal
/Users/jsignell/holoviews/holoviews/util/__init__.py in dynamic_operation(*key, **kwargs)
764 def dynamic_operation(*key, **kwargs):
765 self.p.kwargs.update(kwargs)
--> 766 return self._process(map_obj[key], key)
767 if isinstance(self.p.operation, Operation):
768 return OperationCallable(dynamic_operation, inputs=[map_obj],
/Users/jsignell/holoviews/holoviews/util/__init__.py in _process(self, element, key)
748 return self.p.operation.process_element(element, key, **kwargs)
749 else:
--> 750 return self.p.operation(element, **self.p.kwargs)
751
752
/Users/jsignell/holoviews/holoviews/core/spaces.py in <lambda>(obj, **dynkwargs)
1179
1180 obj = self if clone else self.clone()
-> 1181 dmap = Dynamic(obj, operation=lambda obj, **dynkwargs: obj.opts(*args, **kwargs),
1182 streams=self.streams, link_inputs=True)
1183 if not clone:
/Users/jsignell/holoviews/holoviews/core/dimension.py in opts(self, *args, **kwargs)
1367 from ..util import opts
1368 kwargs['clone'] = True if clone is None else clone
-> 1369 return opts.apply_groups(self, options=options, **kwargs)
1370
1371 kwargs['clone'] = False if clone is None else clone
TypeError: apply_groups() got multiple values for keyword argument 'options' |
Guess I was a bit premature merging this PR (holoviz/holoviews#3257), go one commit back for now I guess. |
36a42b6
to
1d12637
Compare
No description provided.