[Matplotlib-users] Is the Keyword Argument 'transform' of PathPatch Deprecated?

Elan Ernest elch.rz at ruetz-online.de
Tue Jul 30 21:39:31 EDT 2019


No, the transform argument is not deprecated, and it works as intended. 
The problem is that your transform ommits the transformation from the 
axes' data space to pixels and hence rotates the patch directly in pixel 
space.

To rotate in data space, use

transform = trans + ax.transData


Am 30.07.2019 um 14:18 schrieb Amit Yaron:
> It makes actors disappear ,but when I use 'transform_path' it works fine.
> Following is an example code snippet:
>
> theta=np.arcsin(0.6)
> trans=transforms.Affine2D().rotate_around(76.5,32.5,theta)#.transform_path(textPath5) 
>
> pathPatch=patches.PathPatch(textPath5,alpha=1,transform=trans);
>
> Thanks,
>   Amit
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>


More information about the Matplotlib-users mailing list