chaco icon indicating copy to clipboard operation
chaco copied to clipboard

RectangleSelectionTool

Open timdiller opened this issue 11 years ago • 6 comments
trafficstars

This PR adds a RectangleSelectionTool based on the BetterSelectingZoom tool (thanks @tonysyu for the initial implementation). As such, it includes an overlay() method and subclasses AbstractOverlay as well as BaseTool so that it can be appended both to the tools and overlays lists.

Included is a demo chaco/examples/demos/basic/rectangle_selection.py which uses the rectangle tool to select a region in one plot to display zoomed in the other plot.

image

timdiller avatar Dec 13 '13 09:12 timdiller

I would be good to have basic testing for the new overlay (see example using EnableTestsAssistant in DragToolTestCase)

itziakos avatar Feb 10 '14 12:02 itziakos

Completing this PR probably needs to wait for a discussion on the use case and the canonical architecture for tools and overlays.

timdiller avatar Feb 18 '14 15:02 timdiller

I'm currently working on building a tool to crop regions of an image, and this overlay has proved very useful.

We don't necessarily need to merge it because of my use case, but it should probably be documented that someone else has found this useful since it was originally written.

tmreay avatar Jul 05 '18 21:07 tmreay

Is this PR superseded by #482 ?

notmatthancock avatar Sep 01 '19 14:09 notmatthancock

They are different enough that this probably shouldn't be closed - this looks like it is designed for selecting rectangular regions of image plots, not scatter plots.

corranwebster avatar Sep 02 '19 06:09 corranwebster

It sounds like this tool could use a name change to highlight the difference from RectangularSelection. I propose RectangleRegionSelection, with appropriate updates to docstrings to make it clear what this is good for. It might be worth adding a section in the user docs discussing the differences, similar to TableEditor and TabularEditor in traitsui. @corranwebster if that seems like a good idea, I'm willing to take it on.

timdiller avatar May 26 '20 18:05 timdiller