First of all: incredible, Mathworks. You are really trying to sell this as a feature/improvement over the old renderer? If there are oblique borders you render tons of triangles. I am really annoyed, this thing has made my plots ugly for some time now and I have spent ages to fix this thing manually in some cases.
with 2017b the post-processing script doesn't work any more. I found a solution that works for me when I display stuff with contourf. Inkscape (after taking ages to load the 3.5MB svg file MATLAB generates) has the option to select everything of the same color. Hit F2 to enter "edit paths by nodes" mode, select one of the many triangles, right click on it and navigate to "Select Same" --> "Fill Color". The myriads of triangles should be selected now. In the menu bar select "Path" --> "Union". After all paths of the same color are joined you can try "Path" --> "Simplify", for me this usually also works and reduces the number of nodes to a decent number.
Only flaw so far is that sometimes there are additional objects that will also be selected with this method and have to be attended to manually.
Mathworks, please implement a postprocessing in this line for svg export (not based on color I mean of course)!
Cheers.
7 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_389455
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_389455
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_415293
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_415293
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_433728
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_433728
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_441765
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_441765
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_441832
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_441832
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_443152
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_443152
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_458580
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces#comment_458580
Sign in to comment.