-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter integration #15
Comments
Unfortunately you cannot embed a live pyglet canvas, but you can inline a screenshot using |
Good idea, thanks! C:\Anaconda3\lib\site-packages\geoplotlib\__init__.py in inline(width)
69 if os.path.isfile(fname + '.png'):
70 with open(fname + '.png', 'rb') as fin:
---> 71 base64 = urllib.parse.quote(fin.read().encode("base64"))
72
73 image_html = "<img style='width: %dpx; margin: 0px; float: left; border: 1px solid black;' src='data:image/png;base64,%s' />" % (width, base64)
AttributeError: 'bytes' object has no attribute 'encode' Python 3.5.2 and geoplotlib (0.3.1) if that matters. |
I think it is an issue with the I will try to take a look. |
Related question - I am able to use geoplotlib.inline() successfully. However, if I export the notebook to pdf, the plots do not show. I am wondering if there is any solution to this. |
Here is a fix for the error in python 3.5.2 and geoplotlib 0.3.2:
|
@kkaiser Could you PR those changes so we might get a working version for python3, please? |
Done: #44 |
Hey Andrea,
Do you have any idea how to embed the pyglet window into a jupyter notebook?
Currently I output as an image and just reference it from there. Any better idea or integration available?
The text was updated successfully, but these errors were encountered: