BetterZoom and x_min_zoom_factor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

BetterZoom and x_min_zoom_factor

braon moseley

I'd like to limit the zoom in and zoom out natural of BetterZoom, so that my index and value axis do not go beyond certain limits.

Here's a code snippet:

# append tools to pan, zoom, and drag
Vbridge_plot.tools.append(PanTool(Vbridge_plot, restrict_to_data=True))
Vbridge_plot.tools.append(BetterZoom(Vbridge_plot))
Vbridge_plot.tools.x_min_zoom_factor = float(1.0)
Vbridge_plot.tools.x_max_zoom_factor = float(1.0)
Vbridge_plot.tools.y_min_zoom_factor = float(1.0)
Vbridge_plot.tools.y_max_zoom_factor = float(1.0)
Vbridge_plot.tools.append(DragZoom(Vbridge_plot, drag_button="right"))

I've toyed around with different numbers and nothing seems to override the defaults of "1e5" and "1e-5"

I'm new to python, just I've just been plugging away a chaco trying to get it to do what I want it to do.

Thank you all in advance!

Braon
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev