display of x-axis ticks and labels


I am writing a small plotting GUI using Matplotlib 1.0.1 and QT4.6. Essentially I need interaction with the GUI, in order to sett plotted parameters and plotting limits.

This means that I have to set up a figure in a canvas environment in order to use it in QT - at least that is what I gathered from my understanding:

import matplotlib
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
from matplotlib.figure import Figure

      # Create canvas for plotting
      self.fig = Figure((5, 4), dpi=100)
      self.canvas = FigureCanvas(self.fig)
      self.fig.subplots_adjust(left=self.rim, right=1.0-self.rim, top=1.0-self.rim, bottom=self.rim) # set a small rim

Even setting explicitly the xticklabels does not bring them up.
self.ax2.set_xticklabels(self.ax1.get_xticklabels(), visible=True)

I had the impression that I might just not give enough space for them, because of the subplots_adjust function, but changing the available rim didn't help.

Anyone having any ideas what could be going wrong? Or how I could simplify the matplotlib/QT integration?




Sven Duscha
P.O. Box 2
7990 AA, Dwingeloo, The Netherlands
Phone: +31 521 595 241
Email: duscha@...3034...