Open
Description
mpl-altair currently doesn't convert Altair charts that have categorical color, stroke, shape, or size encodings.
Code for reproduction
df = pd.DataFrame({
'a': [1, 2, 3, 4], 'b': [7, 6, 5, 4], 'c': ['a', 'b', 'b', 'c']
})
chart = alt.Chart(df).mark_point().encode(
alt.X('a'), alt.Y('b'), alt.Color('c:N')
)
mplaltair.convert(chart)
Actual outcome
A NotImplementedError
is raised.
Expected outcome
Something that looks kind of like this:
Possible solutions
- Fix this on the Matplotlib side of things
- Incorporate a workaround similar to how
mplaltair._marks._handle_line()
deals with colors in line plots
Metadata
Metadata
Assignees
Labels
No labels