From 87cf7e3f333744ea21690816da497bec1ab93da7 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Thu, 15 Aug 2019 15:09:32 -0400 Subject: [PATCH] Specify explicit coordinates ordering The ordering of x then y makes it possible to pass the output xarray into a HoloViews Image container with the dimensions being transposed --- datashader/pandas.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datashader/pandas.py b/datashader/pandas.py index 921b0df8b..c3e6ddf3a 100644 --- a/datashader/pandas.py +++ b/datashader/pandas.py @@ -7,6 +7,7 @@ from .glyphs.points import _PointLike from .glyphs.area import _AreaToLineLike from .utils import Dispatcher +from collections import OrderedDict __all__ = () @@ -43,5 +44,6 @@ def default(glyph, df, schema, canvas, summary): extend(bases, df, x_st + y_st, x_range + y_range) return finalize(bases, - coords=[y_axis, x_axis], + coords=OrderedDict([(glyph.x_label, x_axis), + (glyph.y_label, y_axis)]), dims=[glyph.y_label, glyph.x_label])