[Matplotlib-users] annotation arrow shrink
vincent.adrien at gmail.com
vincent.adrien at gmail.com
Tue May 29 18:21:48 EDT 2018
Hi Ilya,
Using a null-value for `shrinkA` or `shrinkB` does not achieve what you
want?
FWIW, I think that the method used under the hood by `FancyArrowPatch`
is located
[here](https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/patches.py#L2706),
while the percentage-to-points machinery in `Axes.annotate` (when
*arrowstyle* is `None` and using the *shrink* parameter) seems to start
[there](https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/text.py#L2128).
Attached is a small snippet demonstrating both the percentage-based and
the point-based shrinking possibilities, in case this might help.
Best,
Adrien
On 05/29/2018 11:20 AM, Ilya Flyamer wrote:
> Hi all,
>
> I am trying to figure out how shrinkA works for arrows in annotations,
> and it seems very confusing from experimenting with it - is there an
> explanation somewhere online?
> I simply wanted to ensure that the arrow starts at the edge of the
> bounding box, but it's not so easy, it seems... Is this not the right
> way to do this, maybe?
>
> Thanks!
>
> Cheers,
> Ilya
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shrink_playground.py
Type: text/x-python
Size: 1061 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180529/ed83a67a/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shrink_playground.png
Type: image/png
Size: 15503 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180529/ed83a67a/attachment-0001.png>
More information about the Matplotlib-users
mailing list