pan_state: don't modify mapper range if no change

The way panstate is implemented may accumulate rounding error
This is particularly important for zoom_to_mouse feature,
on only one axis, which is implemented with a 1 axis only panstate
even if prev[1] == next[1], the value axis will increase slightly
at each mouse wheel scroll.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
better_zoom: factorize and fix zoom_to_mouse algorithm

with old algorithm, a zoom-in followed by a zoom-out will
not result in coming back to the same place, which is very
confusing for the user.
The point under the mouse was sent to the center of screen.

With the new algo:
- we make sure that the point under the mouse keeps its mapping on screen.
- we dont use mapper.map_data anymore to find out center of screen because this implies
pixel based rounding errors
- We also factorize the lot of cut and paste in this file.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
zoom: default back to zoom_to_mouse=True

now that zoom_to_mouse is sane again activate it by default
it is much more intuitive for user

Revert "fix the default zoom behavior"

This reverts commit def778932001559d5213502d51bc1b49bcc1245e.
better_zoom: zoom keys also zoom to mouse

This is more coherent that the keys shortcuts for zoom
also follow mouse.

This feature can be disabled using keys_zoom_to_mouse=False
or zoom_to_mouse=False

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
pan_tool: add possibility to Pan using keys

ZoomTool has keys support, why not PanTool?

Still disabled by default
add pan_keys_step=50 to constructor to enable it.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Adding effective alpha to BarPlot, similar to recent changes to PolygonPlot
Moving a basic bar plot to basic directory
Adding demo showing off interesting knobs on the BarPlot class
Rearranging demo config
Oops, bar plot, not polygon plot
Zoom now resets original mapper values when history is reset
Merge remote branch 'origin/master' into barplot_alpha
Giving the alpha treatment to the other plots
DOC: working on user guide (containers)
DOC: docs and examples on Chaco containers
DOC: first draft of containers docs completed
DOC: making Chaco resources more accessible
FIX: origin in jitterplot depends on orientation

Since JitterPlot is a 1D plot, it overwrote ``origin`` to specify it as one of the edges (e.g., 'left', or 'top', instead of 'bottom right').

However, for instance, origin=='bottom' does not make sense for an horizontal JitterPlot, and the implementation ended up creating a plot where the horizontal width depended on the vertical size of the window.

In the new implementation, origin is as usual, and the code takes into account  only the horizontal or vertical part of it, depending on the orientation of the plot.
DOC: working on plot types docs
DOC: more work on the plot types page