I have an .svg file which contains a figure as shown below, it was exported to svg format from MATLAB. To export from MATLAB an external package was used. When I export this figure to .png format in Inkscape, some of the green curves in the bottom plots disappear enter image description here

The exported figure is the following: enter image description here

I tried to make a bitmap copy and then export to .png but the same problem persists. Please let me know if there is a way to troubleshoot this problem? Link to the MATLAB package used to create a svg: https://github.com/kupiqu/fig2svg

Link to the .svg file created: file: https://drive.google.com/file/d/1Kk3K1RZzglwSBXHl-s5nk1KBU3r8Ttcy/view?usp=sharing

  • Sorry, but nobody here knows how and where your diagram was originally constructed. Did you import it from some other software or did you draw it? Much more details are needed if you expect something else than to get voted out. One guess: Start by trying to make a bitmap copy and save it as PNG.
    – user82991
    Aug 5, 2020 at 22:01
  • Thank you. I am not really aware what goes into troubleshooting this kind of problem; can you please let me know if any other information is also required. I will attempt your suggestion and post the result. Aug 6, 2020 at 14:18
  • @AbhinavGupta - you might begin by answering the questions user287001 asked you. This question doesn't have enough details to give an answer really.
    – Billy Kerr
    Aug 6, 2020 at 18:09
  • @Billy Kerr Just updated the question with the answer to that question. Aug 6, 2020 at 19:05
  • I don’t know anything about MATLAB, but I imagine it would probably be useful to add which external package was used for the SVG export as well. Aug 6, 2020 at 19:15

1 Answer 1


Checked the file. As presumed by user Billy Kerr in a comment the SVG had multilevel clipping masks and groups. Inkscape 1.0 left green curves out in the beginning. Illustrator displayed all, but the structure contained some boxes which were as high as Illustrator allowed. Removing them and all obscure multilevel groupings and clipping masks left this:

enter image description here

There's at least text size variations.

Affinity Designer opened it, too, but one of the diagrams was without background and there's text size variations:

enter image description here

The SVG export has something which doesn't obey rules. Competent programmers in theory could see what's the error by inspecting the SVG code in a text editor or debugging environment. But that approach probably costs a huge sum of money because the job very likely is far from trivial. For me and other non-programmers the task is impossible.

But here's a couple of converted versions. The next is PNG 3000x2250 from Affinity Designer


And this is a PDF, saved from Illustrator after removing a ton of groupings, clipping masks and huge invisible objects:


You can open the PDF for ex in GIMP in high enough resolution, say as 3000...4000 px wide if you need a bitmap. Save it as PNG.

You can fix the PDF in Illustrator if it's near enough. Inkscape 1.0 also opens it with internal PDF import option. Do a couple of Ungroups if you want to edit something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.