Re: [Matplotlib-users] How to get correct xtick labels with zooming and panning

2011-08-16 Thread Fiedler, Lars - 0447 - MITLL
I ended up creating a wrapper around the toolbar and resetting the labels and redrawing whenever something changes. Is there a cleaner way? class WrappedNavigationToolbar(NavigationToolbar): def __init__(self, viewer, canvas, parent): self.viewer = viewer super(Wra

[Matplotlib-users] How to get correct xtick labels with zooming and panning

2011-08-16 Thread Fiedler, Lars - 0447 - MITLL
Hi, If I create a bar graph inside a FigureCanvas, how do I get the correct x tick labels to display when someone does a zoom with the NavigationToolbar? For example, lets say I've got the below code: self.axes.set_xticks = range(len(vals)) self.axes.set_xticklabels(xLabels