Skip to content

IPython Magic for Displaying blockdiag family of diagrams in Jupyter notebooks

Notifications You must be signed in to change notification settings

innovationOUtside/ipython_magic_blockdiag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipython_magic_blockdiag

IPython Magic for Displaying blockdiag family of diagrams in Jupyter notebooks

Install from PyPy: pip install blockdiagMagic

Install from this repo as:

pip install --upgrade git+https://github.com/innovationOUtside/ipython_magic_blockdiag.git

(Use %pip install --upgrade git+https://github.com/innovationOUtside/ipython_magic_blockdiag.git from a notebook code cell.)

Binder

%load_ext blockdiag_magic

By defaul, PNG is generated.

Higher quality SVG is available, but in this magic, this requires inkscape. (The original blockdiag package was updated to use imagemagick for SVG rendering so this magic meeds updating to make use of that.)

%setdiagsvg
#Reset to png output with: %setdiagpng
#For inline png
#%setdiagpng
%%blockdiag
A -> B -> C;
B -> D;

Save file:

%%blockdiag -o myfile.svg

  top_page -> config -> config_edit -> config_confirm -> top_page;

Then render:

from IPython.display import SVG
SVG('myfile.svg')

About

IPython Magic for Displaying blockdiag family of diagrams in Jupyter notebooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published