On Tue, Apr 13, 2010 at 8:14 PM, Gökhan Sever <gokhanse...@gmail.com> wrote:
> Hello,
>
> Could someone confirm me if there is any malfunctioning using these simple
> figure functions?
>
> plt.figure(figsize=(2,3))
>
> plt.figure(figsize=(5,6))
>
> plt.figure(figsize=(9,15))
>
> plt.figure(figsize=(19,5))
>
> For some reason I can't get Qt4Agg creating last two figures in specified
> sizes. (WXAgg works fine.)
>
> matplotlib.__version__
> '1.0.svn'
>
> matplotlib.__revision__
> '$Revision: 8226 $'
>
> from PyQt4 import QtCore
> QtCore.PYQT_VERSION_STR
> '4.7'

I can reproduce this behavior with a pure pyqt4 example with no mpl
code, see below. I asked for advice on the pyqt mailing list.

import sys
from PyQt4 import QtCore, QtGui

class Test(QtGui.QWidget):

   def __init__(self, width, height):
       QtGui.QWidget.__init__(self)
       #self.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
       print 'Central widget should have width=%d, height=%d' %(width, height)
       self._width = width
       self._height = height

   def sizeHint(self):
       return QtCore.QSize(self._width, self._height)

app = QtGui.QApplication([])
m = QtGui.QMainWindow()
c = Test(1000, 700)
m.setCentralWidget(c)
m.show()
s = c.size()
print 'but central widget has width=%d, height=%d'% (s.width(), s.height())
sys.exit(app.exec_())

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to