Dear all,
I recently updated pyqtgraph from 0.9 to 0.10 and now have a problem with the exporter.
The same bug appears in the example code given in the documentation:
http://www.pyqtgraph.org/documentation/exporting.htmlThis is what I get:
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyqtgraph as pg
>>> import pyqtgraph.exporters
>>> plt = pg.plot([1,5,2,4,3])
>>> exporter = pg.exporters.ImageExporter(plt.plotItem)
>>> exporter.parameters()['width'] = 100
>>> exporter.export('fileName.png')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/exporters/ImageExporter.py", line 70, in export
bg = np.empty((self.params['width'], self.params['height'], 4), dtype=np.ubyte)
TypeError: 'float' object cannot be interpreted as an index
Best
François