|
From: Andrew D. <da...@at...> - 2013-03-22 10:34:13
|
Thanks, the clipping is working now. But as you say the weird line width issue still remains for Agg (and png, perhaps that uses Agg, I don't know...). PDF output looks correct. On 20 March 2013 05:48, Jae-Joon Lee <lee...@gm...> wrote: > > On Wed, Mar 13, 2013 at 2:17 AM, Andrew Dawson <da...@at...>wrote: > >> You should see that the circle is no longer circular, and also there are >> weird line width issues. What I want it basically exactly like the attached >> without_clipping.png but with paths inside the circle removed. > > > The reason that circle is no more circle is that simply inverting the > vertices does not always results in a correctly inverted path. > Instead of following line. > > interior.vertices = interior.vertices[::-1] > > You should use something like below. > > interior = mpath.Path(np.concatenate([interior.vertices[-2::-1], > interior.vertices[-1:]]), > interior.codes) > > It would be good if we have a method to invert a path. > > This will give you a circle. But the weird line width issue remains. This > seems to be an Agg issue, and the line width seems to depend on the dpi. > I guess @mdboom nay have some insight on this. > > Regards, > > -JJ > > -- Dr Andrew Dawson Atmospheric, Oceanic & Planetary Physics Clarendon Laboratory Parks Road Oxford OX1 3PU, UK Tel: +44 (0)1865 282438 Email: da...@at... Web Site: http://www2.physics.ox.ac.uk/contacts/people/dawson |