Ahh! Yes that is likely it. I assumed that relative dimensions were always
previous non-control point.
On Wed, Mar 4, 2015 at 10:36 PM, Nicolas P. Rougier <
Post by Nicolas P. RougierActually, both syntax are valid.
I think the problem in you svg parser is that you're changing the
reference point each time you iterate in points.
m 100,200 c 100,100 400,100 400,200 z => (m P0 c P1 P2 P3 z)
Your parser ended with vertex at (100.0, -200.0), (200.0, -300.0), (600.0,
-400.0), (1000.0, -600.0)
which corresponds to [P0, P0+P1, P1+P2, P2+P3] but you want [P0, P0+P1, P0+P2, P0+P3]
Nicolas
Post by Jason MooreActually the notation I have is valid SVG path data. Your script could
http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation
But this still doesn't answer why the smoothness is different between
the SVG and matploblib paths. I haven't been able to figure that out yet.
Post by Jason MooreJason
moorepants.info
+01 530-601-9791
Thanks Nicolas for your code.
The difference in what I have and what you share is in the svg path
specification. For some reason Inkscape outputs a single leading "c" for
the bezier curve in my path whereas your path has a "c" for every three
points. I'm not quite sure the difference, maybe Inkscape outputs a
non-standard form.
Post by Jason MooreJason
moorepants.info
+01 530-601-9791
On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier <
https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py
Post by Jason MooreThe svg_parse function might just do what you're trying to achieve.
Nicolas
Post by Jason MooreHi,
I have some SVGs with closed Bezier curve paths that I'd like to
convert to matplotlib paths.
https://gist.github.com/moorepants/4cac02e798446bb46de7
Post by Jason MoorePost by Jason MooreThe above script runs but the resulting path in matplotlib is less
smooth that when opened in inkscape, for example. I've attached screenshots.
Post by Jason MoorePost by Jason MooreI'm not sure why there is a difference.
Any suggestions to get my matplotlib curves looking as smooth as they
do in SVG format?
<Selection_057.png><Selection_058.png>------------------------------------------------------------------------------
Post by Jason MoorePost by Jason MooreDive into the World of Parallel Programming The Go Parallel Website,
sponsored
Post by Jason MoorePost by Jason Mooreby Intel and developed in partnership with Slashdot Media, is your hub
for all
Post by Jason MoorePost by Jason Moorethings parallel software development, from weekly thought leadership
blogs to
Post by Jason MoorePost by Jason Moorenews, videos, case studies, tutorials and more. Take a look and join
the
http://goparallel.sourceforge.net/_______________________________________________
Post by Jason MoorePost by Jason MooreMatplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users