The available heatmap plot from Plots.jl is built with a particular "shape" of data in mind: the user will define:
x - the set of m unique x axis labels
y - the set of n unique y axis labels
z - an m-by-n shape of data values (usually a Matrix)
But this isn't the shape of the data in the most common scenarios in which I want a heatmap. The shape I usually find myself in is having a DataFrame with
an X column with n copies of m x-axis labels
a Y column with m copies of n y-axis labels
a Z column of m-by-n data values, one for each distinct X and Y pair
In other words, the DataFrame is "long" rather than "wide".
What I think would be nice is some "recipe" in which the user can provide:
x - a column to use for x-axis labels
y - a column to use for y axis labels
z - a column to use for colouring
Right now, my workaround is to use unstack on the DataFrame before plotting, but this is a bit ungainly.
The available
heatmap
plot fromPlots.jl
is built with a particular "shape" of data in mind: the user will define:But this isn't the shape of the data in the most common scenarios in which I want a heatmap. The shape I usually find myself in is having a DataFrame with
In other words, the DataFrame is "long" rather than "wide".
What I think would be nice is some "recipe" in which the user can provide:
Right now, my workaround is to use
unstack
on the DataFrame before plotting, but this is a bit ungainly.