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

is display_svg possible? #48

Open
sktrinh12 opened this issue Apr 14, 2019 · 1 comment
Open

is display_svg possible? #48

sktrinh12 opened this issue Apr 14, 2019 · 1 comment

Comments

@sktrinh12
Copy link

Hi, great plugin, I got vim to talk to ipython and was able to produce a matplotlib plot thru %matplotlib qt ; but I couldn't figure out how to display an svg image (nothing shows up but the console doesn't complain, it simply shows the In[10]: line ). It seems that Ipython can display images using a similar approach from here: [(https://stackoverflow.com/questions/28237210/image-does-not-display-in-ipython)]

I tried


from IPython.display import display_svg, SVG
SVG(img.write('svg')) ) #img.write is from another module that writes SVG imgs
display_svg(img)

It works in jupyter. Can it work thru your plugin? Thanks for your time.

@bfredl
Copy link
Owner

bfredl commented Apr 14, 2019

It works in jupyter.

You mean jupyter notebook? We need something that can display an svg image. I can imagine adding a handler that writes images to a temporary file and then a user-specified command to open it in a tab of their browser of choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants