Closed
Description
Documentation Link
Problem
The docstring for artist.Artist.set_agg_filter states that it accepts "A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array."
This seems to be incorrect - the filter function can actually accept (m, n, 3) or (m, n, 4) arrays, depending on whether an alpha channel is used, and must also return two offsets from the lower-left corner, as described here:
Suggested improvement
The parameter part of the docstring at
matplotlib/lib/matplotlib/artist.py
Lines 925 to 939 in 9765379
filter_func : callable
A filter function, which takes a (m, n, depth) float array and a dpi
value, and returns a (m, n, depth) array and two offsets from the bottom
left corner of the image
.. ACCEPTS: a filter function, which takes a (m, n, 3) float array
and a dpi value, and returns a (m, n, 3) array and two offsets
from the bottom left corner of the image