(self, artists)
| 1200 | |
| 1201 | # The rest of the code in this class is to facilitate easy blitting |
| 1202 | def _blit_draw(self, artists): |
| 1203 | # Handles blitted drawing, which renders only the artists given instead |
| 1204 | # of the entire figure. |
| 1205 | updated_ax = {a.axes for a in artists} |
| 1206 | # Enumerate artists to cache Axes backgrounds. We do not draw |
| 1207 | # artists yet to not cache foreground from plots with shared Axes |
| 1208 | for ax in updated_ax: |
| 1209 | # If we haven't cached the background for the current view of this |
| 1210 | # Axes object, do so now. This might not always be reliable, but |
| 1211 | # it's an attempt to automate the process. |
| 1212 | cur_view = ax._get_view() |
| 1213 | view, bg = self._blit_cache.get(ax, (object(), None)) |
| 1214 | if cur_view != view: |
| 1215 | self._blit_cache[ax] = ( |
| 1216 | cur_view, ax.figure.canvas.copy_from_bbox(ax.bbox)) |
| 1217 | # Make a separate pass to draw foreground. |
| 1218 | for a in artists: |
| 1219 | a.axes.draw_artist(a) |
| 1220 | # After rendering all the needed artists, blit each Axes individually. |
| 1221 | for ax in updated_ax: |
| 1222 | ax.figure.canvas.blit(ax.bbox) |
| 1223 | |
| 1224 | def _blit_clear(self, artists): |
| 1225 | # Get a list of the Axes that need clearing from the artists that |
no test coverage detected