matplotlib/matplotlib — pull request #3937 by blink1073 (2014-12-20 03:27:34+00:00)
Title: Rectangle Selector Upgrade

This builds on #3486 and #3502.

This improves the `RectangleSelector` and adds an `EllipseSelector` with minimal code differences.
Improvements:

- Visible handles for manipulating the shape after it has been drawn
- Keyboard modifiers:
- Alt or Space moves the existing shape (as does dragging the center handle)
- Shift makes the shape square (or circular)
- Ctrl makes the initial point the center of the shape (helpful for ellipses)
- Ctrl and shift can be combined
- When drawmode == 'line', actually draw the outline instead of a single line

The API is the same, but the default drawmode has been changed to 'patch', while allowing 'box' to alias to 'patch'. Also, the shape is no longer invisible after been drawn (so we can interact with it).

![ellipse](https://cloud.githubusercontent.com/assets/2096628/5513625/bd9910ba-87c5-11e4-982f-b8cb0a487e13.png)
![rectangle](https://cloud.githubusercontent.com/assets/2096628/5513626/bf51f5e8-87c5-11e4-88c8-f9327521d7c8.png)