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

SVGs displayed in different cells interacting with each other? #662

Closed
cormullion opened this Issue May 31, 2018 · 2 comments

Comments

2 participants
@cormullion
Copy link

cormullion commented May 31, 2018

This is a weird problem but here goes my attempt to describe it.

I have two SVG files, text2.svg and text1.svg, that look like this:

screen shot 2018-05-31 at 13 13 44

The first cell (text1.svg) evaluates fine, but when the second cell with text2.svg is evaluated, it appears to pick up some of the information from the first cell.

screen shot 2018-05-31 at 13 16 26

When I go back and evaluate the first cell ([3]), the second cell magically corrects itself.

screen shot 2018-05-31 at 13 18 52

and then it goes wrong again when I evaluate it again ([4]).

screen shot 2018-05-31 at 13 20 33

One more piece of information, looking into the files, they're all drawn as graphics, not as text (Cairo.jl at work...); SVGs with similar contents drawn using text (from another application) don't have this problem.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200pt" height="200pt" viewBox="0 0 200 200" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
<path style="stroke:none;" d="M 0.820312 -6.6875 L 1.710938 -6.6875 L 1.710938 -5.230469 L 2.542969 -5.230469 L 2.542969 -4.511719 L 1.710938 -4.511719 L 1.710938 -1.097656 C 1.710938 -0.914062 1.769531 -0.792969 1.894531 -0.734375 C 1.960938 -0.695312 2.078125 -0.679688 2.234375 -0.679688 C 2.277344 -0.679688 2.324219 -0.679688 2.375 -0.679688 C 2.421875 -0.683594 2.480469 -0.6875 2.542969 -0.695312 L 2.542969 0 C 2.441406 0.03125 2.339844 0.0507812 2.230469 0.0625 C 2.121094 0.078125 2 0.0820312 1.875 0.0820312 C 1.464844 0.0820312 1.1875 -0.0234375 1.039062 -0.230469 C 0.894531 -0.441406 0.820312 -0.714844 0.820312 -1.050781 L 0.820312 -4.511719 L 0.113281 -4.511719 L 0.113281 -5.230469 L 0.820312 -5.230469 Z M 0.820312 -6.6875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 0.644531 -7.195312 L 1.523438 -7.195312 L 1.523438 -4.523438 C 1.730469 -4.785156 1.917969 -4.96875 2.085938 -5.078125 C 2.367188 -5.265625 2.722656 -5.355469 3.144531 -5.355469 C 3.902344 -5.355469 4.417969 -5.089844 4.6875 -4.5625 C 4.835938 -4.273438 4.90625 -3.867188 4.90625 -3.355469 L 4.90625 0 L 4.003906 0 L 4.003906 -3.296875 C 4.003906 -3.679688 3.953125 -3.960938 3.859375 -4.140625 C 3.699219 -4.425781 3.398438 -4.570312 2.960938 -4.570312 C 2.59375 -4.570312 2.265625 -4.445312 1.96875 -4.195312 C 1.671875 -3.945312 1.523438 -3.46875 1.523438 -2.773438 L 1.523438 0 L 0.644531 0 Z M 0.644531 -7.195312 "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
<path style="stroke:none;" d="M 0.644531 -5.203125 L 1.539062 -5.203125 L 1.539062 0 L 0.644531 0 Z M 0.644531 -7.171875 L 1.539062 -7.171875 L 1.539062 -6.175781 L 0.644531 -6.175781 Z M 0.644531 -7.171875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
<path style="stroke:none;" d="M 1.167969 -1.640625 C 1.195312 -1.347656 1.265625 -1.125 1.386719 -0.96875 C 1.609375 -0.683594 1.992188 -0.542969 2.539062 -0.542969 C 2.863281 -0.542969 3.152344 -0.613281 3.398438 -0.753906 C 3.644531 -0.894531 3.769531 -1.113281 3.769531 -1.410156 C 3.769531 -1.636719 3.671875 -1.804688 3.472656 -1.921875 C 3.34375 -1.996094 3.09375 -2.078125 2.71875 -2.171875 L 2.023438 -2.347656 C 1.578125 -2.460938 1.246094 -2.582031 1.035156 -2.71875 C 0.65625 -2.957031 0.46875 -3.285156 0.46875 -3.707031 C 0.46875 -4.203125 0.648438 -4.601562 1.003906 -4.90625 C 1.359375 -5.210938 1.839844 -5.367188 2.441406 -5.367188 C 3.230469 -5.367188 3.796875 -5.136719 4.144531 -4.671875 C 4.363281 -4.378906 4.46875 -4.0625 4.460938 -3.726562 L 3.632812 -3.726562 C 3.617188 -3.925781 3.546875 -4.105469 3.421875 -4.265625 C 3.21875 -4.5 2.871094 -4.613281 2.375 -4.613281 C 2.042969 -4.613281 1.789062 -4.550781 1.617188 -4.421875 C 1.445312 -4.296875 1.363281 -4.128906 1.363281 -3.921875 C 1.363281 -3.695312 1.476562 -3.511719 1.699219 -3.375 C 1.828125 -3.292969 2.023438 -3.222656 2.273438 -3.160156 L 2.855469 -3.015625 C 3.488281 -2.863281 3.910156 -2.714844 4.125 -2.574219 C 4.46875 -2.347656 4.640625 -1.996094 4.640625 -1.515625 C 4.640625 -1.046875 4.460938 -0.644531 4.109375 -0.308594 C 3.757812 0.03125 3.21875 0.199219 2.496094 0.199219 C 1.71875 0.199219 1.167969 0.0234375 0.84375 -0.328125 C 0.519531 -0.683594 0.34375 -1.121094 0.320312 -1.640625 Z M 1.167969 -1.640625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
<g>
etc 

Using Julia 0.6.2 and IJulia 1.8.0.

@cormullion

This comment has been minimized.

Copy link

cormullion commented Jun 4, 2018

It turns out that this a known issue with SVGs in notebooks:

ipython/ipython#1866

But it’s not clear (to me) how to fix it. ("Wrap SVG in IFrame”)?

@stevengj

This comment has been minimized.

Copy link
Member

stevengj commented Jul 13, 2018

Closing as not an IJulia bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment