question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is your feature request related to a problem? Please describe the problem.

I want a way to output svg graphics in Python. I’m not the only one!

Describe the solution you’d like

I would love for st.write(...) to support an existing svg python library like

  • svgwrite
  • svglib
  • CairoSVG (Never tried these, so not sure which is good, but we should pick the best / most widely used one.)

Describe alternatives you’ve considered

We could also look to see if Jupyter supports SVG and which libraries they’re using.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
tc87commented, Dec 19, 2019

A few additional notes from offline conversations:

  • It would be great if we could autodetect the format parameter too.
  • These should all be viable:
st.image(url_to_svg, format="svg")
st.image(svg_string, format="svg")
st.image(stringio_with_svg, format="svg")  # (So it supports files)
5reactions
treuillecommented, Mar 21, 2020

@drorata : I believe that for that case you’d have to first open the file with Python’s open() function, then pass it into st.image().

I hope you and your loved ones are safe and well! ✌️

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVG Support – WordPress plugin
Safely upload SVG files to your media library and use them like any other image. Now with optional sanitization! But SVG Support has...
Read more >
SVG (basic support) | Can I use... Support tables for ... - CanIUse
SVG (basic support). - CR. Method of displaying basic Vector Graphics features using the embed or object elements. Refers to the SVG 1.1...
Read more >
Enable SVG Support in WordPress | WP Engine®
First, you'll need to download and install an SVG plugin. We recommend SVG Support: Once you've installed and activated the plugin, you'll have ......
Read more >
What Is an SVG File (And How do You Upload SVGs ... - Kinsta
SVG files are currently supported by all major browsers including mobile browsers. The only issue you might run into is if you still...
Read more >
How to Safely Enable SVG Support in WordPress (Manually ...
SVG and WordPress – How to Safely Enable SVG Support via Plugin · 1. Prepare Your File · 2. Install the Plugin ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found