Skip to content

Commit de6f8a4

Browse files
Fix demo code in plot.py and not calling super().__init__()
1 parent c8ec30e commit de6f8a4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

graphnics/plot.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def __init__(self, G, fname, **kwargs):
4040
fname (str): location and name for file
4141
4242
Example:
43-
>> G = make_Y_bifurcation(dim=3)
43+
>> G = Y_bifurcation(dim=3)
4444
>> for e in G.edges():
45-
>> G.edges()[e]['radius'] = 1
46-
>> V = FunctionSpace(G.mesh, 'CG', 1)
47-
>> f_i = interpolate(Expression('x[0]', degree=2))
48-
>> f_i.rename('f', '0.0')
49-
>> TubeFile(G, 'test.pvd') << f_i
45+
>> G.edges()[e]['radius'] = 1
46+
>> V = FunctionSpace(G.mesh, 'CG', 1)
47+
>> f_i = interpolate(Expression('x[0]', degree=2), V)
48+
>> f_i.rename('f', '0.0')
49+
>> TubeFile(G, 'test.pvd') << f_i
5050
"""
51-
51+
super().__init__(fname)
5252
f_name, f_ext = os.path.splitext(fname)
5353
assert f_ext == '.pvd', 'TubeFile must have .pvd file ending'
5454

@@ -167,4 +167,4 @@ def __lshift__(self, func):
167167
<Collection>\n"""
168168

169169
pvd_footer= """</Collection>
170-
</VTKFile>"""
170+
</VTKFile>"""

0 commit comments

Comments
 (0)