-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
mpl-altair currently doesn't support conversion for Altair charts that use timeUnit aggregations.
Code for reproduction
This and other timeUnit transformations don't work:
from vega_datasets import data
seattle = data.seattle_weather()
chart = alt.Chart(seattle).mark_point().encode(
alt.X('month(date)'), alt.Y('temp_max')
)
mplaltair.convert(chart)Actual outcome
A NotImplementedError is raised for anything that has a timeUnit.
Expected outcome
Any plot with a timeUnit transformation should work.
This plot should look something like this:
Possible solution and notes
- Manipulate the data in
parse_chart.ChannelMetadata()so that the data reflects the timeUnit aggregation. (seeparse_chart.ChannelMetadata._handle_timeUnit().) - Also note that timeUnit transformations can also be applied separately from timeUnit transformations in the encoding channel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
