Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jinja rendering matplotlib plots?

I am looking at combining matplotlib and jinja2 to produce html pages.

What I do now is just including an image previously produced by matplotlib as a reference in my html page. The result is really static.

I've seen related questions like here or here, but none related to matplotlib/jinja integration (ultimately I'd like interactivity but It does not seem to be simple enough for me).

Is there any alternative to what I do ?

like image 333
LB40 Avatar asked Nov 12 '22 21:11

LB40


1 Answers

Ipython notebook from v1.x uses jinja2.

You can create inline images in the notebook and then convert it to a static html with nbconvert. You can provide custom css and you can customise the output html to hide code cells, cell numbers, ...

like image 184
Francesco Montesano Avatar answered Nov 15 '22 01:11

Francesco Montesano