You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in rafaqz/Rasters.jl#492, it would be nice to be able to choose what dimensions go in which axis when plotting something. At the moment DD only deals with dimensions X, Y, and Z, and we may get an error when a dimension that's called something different is part of a DimArray that's being plotted. In many fields the axis names can be different, thus the flexibility of choosing each axis' dimension is very useful in general. While one can always rename the axis, this is not always feasible (there's more details as to why here).
One idea suggested by @rafaqz is to add a dims keyword that would rename the axis accordingly (to X, Y or Z) behind the scenes. It would work like:
heatmap(DA; dims=(X=:fX, Y=:fY))
Another idea is to modify the code to plot the axes without any renaming, since plotting the data using the DimArray's actual dimension names is more informative. Then a possible user interface would be the same as the one already used by heatmap (and similar to what python-xarray uses, for example). As an examle, a DimArray with dimensions x1 and x2 can be plotted as
As discussed in rafaqz/Rasters.jl#492, it would be nice to be able to choose what dimensions go in which axis when plotting something. At the moment DD only deals with dimensions
X
,Y
, andZ
, and we may get an error when a dimension that's called something different is part of aDimArray
that's being plotted. In many fields the axis names can be different, thus the flexibility of choosing each axis' dimension is very useful in general. While one can always rename the axis, this is not always feasible (there's more details as to why here).One idea suggested by @rafaqz is to add a
dims
keyword that would rename the axis accordingly (toX
,Y
orZ
) behind the scenes. It would work like:Another idea is to modify the code to plot the axes without any renaming, since plotting the data using the DimArray's actual dimension names is more informative. Then a possible user interface would be the same as the one already used by
heatmap
(and similar to what python-xarray uses, for example). As an examle, aDimArray
with dimensionsx1
andx2
can be plotted ascc @rafaqz
PS.: I found an old issue of mine that also discussed this: #432
The text was updated successfully, but these errors were encountered: