Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,11 @@ def add_artist(self, a):
"""
Add any :class:`~matplotlib.artist.Artist` to the axes.

Artist added to the axes using this method are not taken into
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Artist' -> 'Artists'

account for auto-scaling. If you want autoscaling to take your
artists into account use :func:`~matplotlib.Axes.add_line` or
:func:`~matplotlib.Axes.add_patch`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is misleading in three ways: first, because some collections also know how to change the dataLim; second, because there are other Artist subclasses; and third because the general advice should be, 'Use add_artist only for artists for which there is no dedicated "add" method; and if necessary, use a method such as update_datalim or update_datalim_numerix to manually update the dataLim if the artist is to be included in autoscaling.'


Returns the artist.
"""
a.set_axes(self)
Expand Down