Skip to content

Drawing an arrow using axis.annotate raises DeprecationWarning #3527

Description

@philippjfr

In matplotlib 1.4.0 the following code:

fig=plt.figure()
ax=fig.add_subplot(111)
plt.plot([0,1],[0,1])
ax.annotate("Example Arrow", xy=(0.5, 0.5),
            xytext=(0.3, 0.6), arrowprops=dict(arrowstyle="->"))

raises many DeprecationWarning of the form:

.../python2.7/site-packages/matplotlib/bezier.py:298: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
path_out = Path(concat([verts_right, path.vertices[i:]]),

Presumably this is due to the recent changes to Annotation, switching from xytext to xyann. There doesn't seem to be any way for the user to avoid this when drawing an arrow annotation.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions