jupyter notebook - API for inline graphics in ipython -


i made small library in python can generate graphics , i'd able display object in ipython %matplotlib inline.

is there library use make work in simple way? bonus points if display can made interactive.

from docs on how add rich display of objects: http://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display

so long control class definitions, can add _repr_*_ methods, e.g. _repr_png_ or _repr_html_. note they're surrounded single underscores, unlike python's own magic __repr__ method. text data html should returned string, , binary data png bytes.

if don't control class definition, can register formatters separately:

get_ipython().display_formatter.formatters['image/png'].for_type(mytype, func) 

for_type() method docs


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -