Skip to content
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

strange svg rendering when glyph names are shared #333

Closed
simonbyrne opened this issue Aug 25, 2015 · 4 comments
Closed

strange svg rendering when glyph names are shared #333

simonbyrne opened this issue Aug 25, 2015 · 4 comments
Milestone

Comments

@simonbyrne
Copy link

@simonbyrne simonbyrne commented Aug 25, 2015

I don't know enough about the svg format to know if this is a problem with the notebook or something else, but I'm seeing some odd behaviour when I display multiple svg files which have defs elements that overlap ids.

For example, this notebook:
https://gist.github.com/simonbyrne/47b27e6113df84c81fd8

It seems to render okay in github, but when I use notebook viewer (or use jupyter locally), the letters (which are actually symbols defined as defs, blame R's svg export) display incorrectly:
http://nbviewer.ipython.org/gist/simonbyrne/47b27e6113df84c81fd8
the second image looks like this:
screen shot 2015-08-25 at 15 11 54

If I manually rename the ids to be unique in both files, the problem goes away. It could be a browser problem, but I see the same in both Chrome and Safari.

@simonbyrne

This comment has been minimized.

Copy link
Author

@simonbyrne simonbyrne commented Aug 26, 2015

Never mind, this is a problem with inline svg rendering:
http://stackoverflow.com/questions/16123721/how-to-use-local-defs-in-svg

@simonbyrne simonbyrne closed this Aug 26, 2015
@mykelk

This comment has been minimized.

Copy link

@mykelk mykelk commented Mar 9, 2016

TikzPictures.jl does some search and replace tricks of the svg in the writemime function here to handle this issue in Jupyter notebooks.

@simonbyrne

This comment has been minimized.

@mykelk

This comment has been minimized.

Copy link

@mykelk mykelk commented Mar 10, 2016

@simonbyrne, you might need to do something similar for clip, image, linear, etc. in addition to glyph, depending on what kinds of svgs you're generating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.