Skip to content
Snippets Groups Projects
Commit 04232aaa authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Merge branch 'PlotPatch' into 'master'

[Fix] Matplotlib arrow rendering

Closes #67

See merge request pycodegen/pystencils!322
parents 381c3e09 f6a43aba
No related branches found
No related tags found
1 merge request!322[Fix] Matplotlib arrow rendering
Pipeline #51734 passed
...@@ -421,11 +421,12 @@ def plot_3d(stencil, figure=None, axes=None, data=None, textsize='8'): ...@@ -421,11 +421,12 @@ def plot_3d(stencil, figure=None, axes=None, data=None, textsize='8'):
FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs) FancyArrowPatch.__init__(self, (0, 0), (0, 0), *args, **kwargs)
self._verts3d = xs, ys, zs self._verts3d = xs, ys, zs
def draw(self, renderer): def do_3d_projection(self, *_):
xs3d, ys3d, zs3d = self._verts3d xs3d, ys3d, zs3d = self._verts3d
xs, ys, zs = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M) xs, ys, zs = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
self.set_positions((xs[0], ys[0]), (xs[1], ys[1])) self.set_positions((xs[0], ys[0]), (xs[1], ys[1]))
FancyArrowPatch.draw(self, renderer)
return np.min(zs)
if axes is None: if axes is None:
if figure is None: if figure is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment