This is something that we've talked about at various times, and currently I think the best approach would be to vl-convert to convert Vega-Lite to Vega, then use VegaFusion to pre-evaluate and simplify the Vega spec, then have Python logic that builds a matplotlib figure from the simplified Vega spec. Here are some more thoughts: https://github.com/altair-viz/altair/discussions/3035.
Could you elaborate on your use case? i.e. What would you be able to do with the matplotlib output that you can't do with Altair?
Hi @Dmayset,
This is something that we've talked about at various times, and currently I think the best approach would be to vl-convert to convert Vega-Lite to Vega, then use VegaFusion to pre-evaluate and simplify the Vega spec, then have Python logic that builds a matplotlib figure from the simplified Vega spec. Here are some more thoughts: https://github.com/altair-viz/altair/discussions/3035.
Could you elaborate on your use case? i.e. What would you be able to do with the matplotlib output that you can't do with Altair?