[Matplotlib-users] Circular Arrow Closed Path

Amit Yaron amit at phpandmore.net
Thu Sep 7 15:11:31 EDT 2017


Thanks, Adrien

I'm going to use the Bézier curves for interactivity.
Class 'FancyArrowPatch' has the method 'get_path()' , which is helpful 
in creating the approximation.

Best regards,
   Amit

On 05.09.2017 21:47, 
vincent.adrien at gmail.com wrote:
> Hi Amit,
> 
> You may find usseful ressources about arrow shapes in Matplotlib at 
> https://matplotlib.org/users/annotations.html, with examples on how to 
> use the `matplotlib.axes.Axes.annotate` method(, which heavily relies on 
> the `matplotlib.patches.FancyArrowPatch` if you are actually more 
> interested in how things are done under the hood).
> 
> Here is a quick example of what you can expect more or less 
> out-of-the-box from `ax.annotate`:
> ```python
> import matplotlib.pyplot as plt
> 
> fig, ax = plt.subplots(num='demo_arrow_with_annotate.png',
>                         figsize=(3, 3))
> 
> ax.annotate("",
>              xy=(0.5, 0.8), xycoords='data',
>              xytext=(0.5, 0.2), textcoords='data',
>              size=40, va="center", ha="center",
>              arrowprops=dict(arrowstyle="simple",  # <-- ~ LO style
>                              facecolor="DeepPink", edgecolor="none",
>                              connectionstyle="arc3,rad=1"),
>              )
> 
> plt.show()
> ```
> 
> If you really want a specific patch shape that you cannot get by 
> tweaking the existing arrow shapes, it should still be possible to 
> define a patch directly with vertices and Bézier curves.
> 
> Best regards,
> Adrien
> 
> On 09/05/2017 11:04 AM, Amit Yaron wrote:
>> Hi,
>>
>> Does this shape already exist in Matplotlib modules?
>> I've attached an example prepared with LibreOffice Draw.
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-users
>>
> 
> 
> 
> _______________________________________________
> 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