nvim-ipy icon indicating copy to clipboard operation
nvim-ipy copied to clipboard

is display_svg possible?

Open sktrinh12 opened this issue 6 years ago • 1 comments

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.

sktrinh12 avatar Apr 14 '19 16:04 sktrinh12

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.

bfredl avatar Apr 14 '19 16:04 bfredl