Skip to content

Commit

Permalink
switch svg embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb committed Dec 11, 2017
1 parent 7b46ea8 commit 5ec7ce7
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 56 deletions.
4 changes: 2 additions & 2 deletions penkit/preview.py
Expand Up @@ -3,7 +3,7 @@
These functions are useful for iterative development of plots.
"""

from IPython.display import HTML
from IPython.display import SVG

from penkit.write import plot_to_svg

Expand Down Expand Up @@ -36,4 +36,4 @@ def show_plot(plot, width=PREVIEW_WIDTH, height=PREVIEW_HEIGHT):
Returns:
An object that renders in Jupyter as the provided plot
"""
return HTML(plot_to_svg(plot, width, height))
return SVG(data=plot_to_svg(plot, width, height))
2 changes: 1 addition & 1 deletion setup.py
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='penkit',
version='0.0.3',
version='0.0.4',
description='Library for pen plotting in Python.',
author='Paul Butler',
author_email='penkit@paulbutler.org',
Expand Down
30 changes: 15 additions & 15 deletions tutorial/01-Layers.ipynb

Large diffs are not rendered by default.

28 changes: 15 additions & 13 deletions tutorial/02-Fractals.ipynb

Large diffs are not rendered by default.

43 changes: 18 additions & 25 deletions tutorial/03-Surface Projections.ipynb

Large diffs are not rendered by default.

0 comments on commit 5ec7ce7

Please sign in to comment.