-
-
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
Add support for ImageStack #693
Conversation
geoviews/plotting/mpl/__init__.py
Outdated
def __init__(self, element, **params): | ||
super().__init__(element, **params) | ||
|
||
def get_data(self, element, ranges, style): | ||
self._norm_kwargs(element, ranges, style, element.vdims[0]) | ||
style.pop('interpolation', None) | ||
xs, ys, zs = geo_mesh(element) | ||
xs = GridInterface._infer_interval_breaks(xs) | ||
ys = GridInterface._infer_interval_breaks(ys) | ||
if self.geographic: | ||
style['transform'] = element.crs | ||
return (xs, ys, zs), style, {} |
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.
I have no idea why MPL ImageStack is not going through this code; if I add print/raise, it doesn't do anything.
I am so stumped on how this works: import numpy as np
import geoviews as gv
import cartopy.crs as ccrs
import panel as pn
gv.extension("matplotlib")
x = np.arange(-120, -117)
y = np.arange(40, 43)
a = np.array([[np.nan, np.nan, 1], [np.nan, np.nan, 1], [np.nan] * 3])
b = np.array([[np.nan] * 3, [1, 1, 1], [np.nan] * 3])
img_stack = gv.ImageStack(
(x, y, a, b), kdims=["x", "y"], vdims=["a", "b"], crs=ccrs.PlateCarree()
)
img_stack when I have |
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.
Can you test if this works with non-equal lengths of x and y?
Closes #691