Skip to content

When used as backend for matplotlib, GR can't export to svg #178

@JackLilhammers

Description

@JackLilhammers

I am developing a desktop application that utilizes Matplotlib for plotting purposes.
To improve performance, I have chosen the GR framework as the backend for Matplotlib, since it's 100 times faster. (nice!)

However, I am currently facing an issue where exporting plots to SVG:

  • GR, when used directly, supports exporting plots to SVG
  • When used as backend for mpl, I get the infamous: The GR backend does not support svg output error

While researching a solution, I found this old closed issue: gr as backend for matplotlib: Can I save images as png?
Interestingly enough, a response suggested that exporting to SVG format would be an easier alternative, indicating the potential existence of SVG export capability with GR as a backend.
Did I misunderstand something?

OTOH, if this feature is missing, would it be hard to add it?
What would it take to implement it? I'm willing to help, but I know nothing about matplotlib's backends...

Thank you for your attention to this matter

Update:
I patched the backend to save SVGs, but it does it as slow as mpl, so I'm clearly doing something wrong...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions