[IPython-dev] IPython Notebook Diagrams

Andrew Gibiansky andrew.gibiansky@gmail....
Wed Feb 19 17:46:07 CST 2014


That's really cool!

However, I'm looking for a solution such that the diagram code is hidden from the user. This would make it plausible to publish the result as a blog or something along those lines, where the code used to make the diagram is unnecessary, but the diagram itself is.

-- Andrew



On February 19, 2014 at 3:44:52 PM, Tavish Armstrong (tavisharmstrong@gmail.com) wrote:

On Wed, Feb 19, 2014 at 03:37:24PM -0800, Andrew Gibiansky wrote: 
> Hello, 
> 
> I am tired of needing to create diagrams externally and then either 
> use Markdown links (which require the image to be exported and saved 
> somewhere) or copy/pasting the base64 encoding of the image into the 
> Markdown cell (which occasionally crashes my browser for big images). 
> I would like to be able to create diagrams immediately within the 
> Markdown cells. 
> 
> What's the best way to do this? I wanted to go with RaphaelJS and put 
> <script> tags within Markdown cells, but it seems that that is broken 
> on master due to bad parsing of quotes (though I've heard discussion 
> that it'll be completely removed in 1.0, which leaves me confused, 
> since it's clearly not completely removed...) 
> 
> How would you suggest going about this goal? 

For very simple diagrams, you might want to take a look at %blockdiag 
magic: 

https://bitbucket.org/vladf/ipython-diags 

It takes a cell containing... 

%%blockdiag 
{ 
a -> b -> c -> d; 
c -> e; 
e -> a; 
} 

and generates a block/sequence/activity diagram using that spec. 

Hope this helps, 
-- 
Tavish 
_______________________________________________ 
IPython-dev mailing list 
IPython-dev@scipy.org 
http://mail.scipy.org/mailman/listinfo/ipython-dev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20140219/5ecd3422/attachment-0001.html 


More information about the IPython-dev mailing list