Lior Weintraub
2018-09-12 17:41:46 UTC
Hi,
I am using python 3.6 on Windows and running pyqtgraph version 0.10.0.
When using image exporter according this
<http://www.pyqtgraph.org/documentation/exporting.html> example I got
exception on ImageExplorer.py line 70:
bg = np.empty((self.params['width'], self.params['height'], 4),
dtype=np.ubyte)
Note that only the concept was copied from the example and was applied on
my plot which had different distentions.
The exception was caused because height was a float number.
I saw in code that aspect ratio is kept so I change the width dimension so
the height would be an integer.
Even then, the height was set to float.
In my example the width was 3000 and the height was calculated as 1750.0
Finally, when nothing worked I patched the code and changed line 70 to:
bg = np.empty((int(self.params['width']), int(self.params['height']),
4), dtype=np.ubyte)
If you think this needs to be fixed in a differently, please share your
thoughts.
Best regards,
Lior.
I am using python 3.6 on Windows and running pyqtgraph version 0.10.0.
When using image exporter according this
<http://www.pyqtgraph.org/documentation/exporting.html> example I got
exception on ImageExplorer.py line 70:
bg = np.empty((self.params['width'], self.params['height'], 4),
dtype=np.ubyte)
Note that only the concept was copied from the example and was applied on
my plot which had different distentions.
The exception was caused because height was a float number.
I saw in code that aspect ratio is kept so I change the width dimension so
the height would be an integer.
Even then, the height was set to float.
In my example the width was 3000 and the height was calculated as 1750.0
Finally, when nothing worked I patched the code and changed line 70 to:
bg = np.empty((int(self.params['width']), int(self.params['height']),
4), dtype=np.ubyte)
If you think this needs to be fixed in a differently, please share your
thoughts.
Best regards,
Lior.
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/1bb097ca-fc3d-4f41-94f5-862e0ee991dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/1bb097ca-fc3d-4f41-94f5-862e0ee991dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.