|
From: Jason M. <moo...@gm...> - 2015-03-04 22:32:38
|
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. Jason moorepants.info +01 530-601-9791 On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier <Nic...@in... > wrote: > > Here is a (limited) SVG path parser I made some time ago: > > > https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py > > > The svg_parse function might just do what you're trying to achieve. > > > Nicolas > > > On 04 Mar 2015, at 20:51, Jason Moore <moo...@gm...> wrote: > > > > Hi, > > > > I have some SVGs with closed Bezier curve paths that I'd like to convert > to matplotlib paths. > > > > For example, here is some code: > https://gist.github.com/moorepants/4cac02e798446bb46de7 > > > > The above script runs but the resulting path in matplotlib is less > smooth that when opened in inkscape, for example. I've attached screenshots. > > > > I'm not sure why there is a difference. > > > > Any suggestions to get my matplotlib curves looking as smooth as they do > in SVG format? > > > > Jason > > moorepants.info > > +01 530-601-9791 > > > <Selection_057.png><Selection_058.png>------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > > by Intel and developed in partnership with Slashdot Media, is your hub > for all > > things parallel software development, from weekly thought leadership > blogs to > > news, videos, case studies, tutorials and more. Take a look and join the > > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |