Closed edwardchalstrey1 closed 3 years ago
Notes on the hot mess that is Altair/Vega-Lite colour binning/scales:
Color.scale
is the function that transforms data domain to visual domain; when the data domain is continuous, scale can be continuous or discretisingScale.bin
can be provided for discretising scalesScale
and Color
provide bins?@edwardchalstrey1 Morning. I don't seem to be able to create a Color
object any more that doesn't specify a bin
-- I had that problem locally before, but now it seems to be the case in the notebook too. Yesterday I had to bump Python to 3.9.8 (because GitHub Actions stopped supporting 3.9.7), and I wasn't able to do this in way that didn't involve regenerating poetry.lock
. I pinned jsonschema
to avoid that problem from last week, but I guess lots of other things got updated, and that might have included the altair
version.
Either way, I seem to be able to pick a continuous Scale
, but not to disable binning, so I'm not (at the moment) able to reproduce the original problem (since the colour encoding is never really continuous).
Done/dropped:
bin
argument toalt.Color
is requiredFalse is not one of [True]
)bin=None
in test case :x:None is not one of [True]
Scale
providesbins
, doesColor
need to providebin
too? :x: yestest case-- can't seem to make analt.Color
with a continuous encodingbin
in notebook