[Matplotlib-users] Circular Arrow Closed Path
vincent.adrien at gmail.com
vincent.adrien at gmail.com
Tue Sep 5 14:47:19 EDT 2017
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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo_arrow_with_annotate.png
Type: image/png
Size: 8900 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20170905/b96099e9/attachment.png>
More information about the Matplotlib-users
mailing list