File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/Text/Pandoc/Filter/Plot/Renderers Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,14 @@ import sage.plot.plot3d.base as go3d
7575import builtins
7676# Try to concatenate 3D graphics objects first; if this doesn't work, then
7777# concatenate all 2D graphic objects.
78- __all_graphics = builtins.sum( (obj for obj in globals().values() if isinstance(obj, go3d.Graphics3d)), None)
79- if __all_graphics is None:
80- __all_graphics = builtins.sum(obj for obj in globals().values() if isinstance(obj, go.Graphics))
78+ __all_graphics = builtins.sum( (obj for obj in globals().values() if isinstance(obj, go3d.Graphics3d)))
79+ if not __all_graphics:
80+ __all_graphics = builtins.sum( (obj for obj in globals().values() if isinstance(obj, go.Graphics)))
81+ if not __all_graphics:
82+ raise RuntimeError(''.join([
83+ "No plotting objects detected. ",
84+ "Make sure that all of your plotting objects are named, e.g. `G = plot(...)` rather than just `plot(...)`. ",
85+ "This is a limitation specific to the interaction between sage and pandoc-plot."
86+ ]))
8187__all_graphics.save_image(r"#{fname}", dpi=#{dpi})
8288|]
You can’t perform that action at this time.
0 commit comments