JuliaPlots / UnicodePlots.jl

Unicode-based scientific plotting for working in the terminal
Other
1.45k stars 82 forks source link

Heatmap handling of NaN #362

Open fredcallaway opened 1 year ago

fredcallaway commented 1 year ago

It seems that the current behavior of heatmap is to replace NaN values with a grid of transparent and white cells:

image

I think it would make much more sense if NaN mapped to a consistent color, probably transparent.

t-bltg commented 1 year ago

Actually, a row consist of half blocks characters at the bottom, with a background color for the remaining upper part.

fredcallaway commented 1 year ago

Hmm, well then half blocks must be used throughout because the NaN cells are the same size as the other ones (you can see that you get one row for each of the 8 rows in the matrix above).

Implementation aside, the question is: should NaN be represented by a single color everywhere or a different color depending on what row you're in?

sadish-d commented 6 months ago

The only thing that makes sense to me is for NaNs to be transparent. This makes sense because they can, in practice, be used to represent missing values.

t-bltg commented 6 months ago

I agree that we should probably switch to no coloring for NaNs, to be consistent with other plotting libraries.