taipy icon indicating copy to clipboard operation
taipy copied to clipboard

Add an example on how to integrate Matplotlib

Open FabienLelaquais opened this issue 1 year ago β€’ 8 comments

What would that feature address

Many Python programmers are using Matplotlib as a way to create charts.

These are static, and we want to let users in charge of defining their charts entirely.

Description of the ideal solution

The best way to do this seems to be using mpld3 and the plugins module.

An example would show how to create a Matplotlib chart, and how to integrate it in a Taipy page (certainly using the figure property of the chart control).

Acceptance Criteria

  • [ ] The example is part of the documentation set.

FabienLelaquais avatar May 15 '23 09:05 FabienLelaquais

@FabienLelaquais can u assign this issue to me

abhayg-07 avatar Oct 24 '23 16:10 abhayg-07

Sure thing, thanks a lot!

Note that my approach would be to use the part control, where the page property would be set to the returned value of taipy.gui.get_user_content_url()... Not really straightforward hu? Any idea on simplifying that is welcome! Thanks again.

FabienLelaquais avatar Oct 25 '23 14:10 FabienLelaquais

With the latest content property on part, you can simply provide a Matplotlib figure as a value <|part|content={mp_figure}|>

FredLL-Avaiga avatar Nov 22 '23 14:11 FredLL-Avaiga

Indeed as @FredLL-Avaiga mentioned, Taipy GUI (only in the develop branch at this point) was complemented with a new property for the part control that makes it possible to insert any HTML content coming from a third-party library. This needs a bit of documentation, which is on the way (see doc issue).

We plan to close this issue at the end of next week.

FabienLelaquais avatar Nov 23 '23 10:11 FabienLelaquais