Are these parameters future-proof MPLRenderer.get_plot(axis=..., fig=...)?

Hi there,

I’m in the process of upgrading a library currently relying on matplotlib to use holoviews. An important part of the API is that each plot function can (optionally) take a custom matplotlib Axis to draw on, so that canned plots can be stacked by the user easily. Obviously future uses of the lib should use the great hv layout system, but it would be nice to keep backward compat for existing users.

This seems to allow drawing over the existing “ax” axis, but it is not documented, I found that by reading the code. Can “axis” and “fig” parameters be relied on ?

hv.Store.renderers['matplotlib'].get_plot(foobar, axis=ax, fig=ax.figure)
1 Like

Hi @douglas-raillard-arm

Welcome to the community :+1:

That is probably a question for @philippjfr .

Yes, this API has been stable for years and I don’t expect it to change.

1 Like

Great, thanks a lot, the more I look into holoviews and the more it looks like a perfect fit

1 Like

Hi @douglas-raillard-arm

Which library are you working on?

Hi @Marc , it’s some sort of framework to do some experiments and testing with the linux kernel (mainly the scheduler):

There is a bunch of plotting functions to look at various signals and aggregated data from traces:
https://lisa-linux-integrated-system-analysis.readthedocs.io/en/master/trace_analysis.html

1 Like

Thanks. Looks like a fine Project. Will you be streaming live data to HoloViews/ Panel?

Probably not live, as we mostly work with trace files rather than live data, as the tests we carry have to run in a pristine environment (checking what the scheduler does is tricky if you have lots of things happening in the background). It’s quite likely I’ll end up checking out Panel though, to provide some sort of GUI to the plot function we have. There is already a CLI tool that allows using them.

1 Like