Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is it possible to use tikz in notebook

Hi

I am wondering if it is possible to render tikz from code inside the notebook.

If not: Is there some other way of drawing graphs with the same degree of control as you get with tikz?

I am using matplotlib for some plots in the notebook and the built-in Graph function for some graph theory. The problem is that sometimes I want to show a graph with specific proportions and with specific placement of nodes, lines and points, to make some argument clearly shown.

I hope it makes sense what I am asking....

Is it possible to use tikz in notebook

Hi

I am wondering if it is possible to render tikz from code inside the notebook.

If not: Is there some other way of drawing graphs with the same degree of control as you get with tikz?

I am using matplotlib for some plots in the notebook and the built-in Graph function for some graph theory. The problem is that sometimes I want to show a graph with specific proportions and with specific placement of nodes, lines and points, to make some argument clearly shown.

An example:

f= {'House 1': ['Water', 'Electricity', 'Phone Line'], 
'House 2': ['Water', 'Electricity', 'Phone Line'],
'House 3': ['Water', 'Electricity']}
g = Graph(f)
g.plot(pos=g.layout_planar())

Gives:

image description

Where I want something like:

image description

I hope it makes sense what I am asking....