Reputation: 31
I want to write simple GUI tools for new hardware developed in my company. I need to use python because my company uses a lot of old libraries. My idea is now to use Python and PyQt to write the application and use pyinstaller to deploy it to other colleagues (installing python everywhere is not what we want). It works pretty good so far, but when i try to use plotting libraries, as for instance PyQwt, the size of the executable increases from approximediatly 15MB to 120MB. I found out that this is because PyQwt supports NumPy. However, I don't need NumPy for my projects.
I found a couple of plotting tools as for instance: PyQwt, Matplotlib, PyQtGraph However, all of them use Numpy.
My question is: Is there a plotting tool or framework for PyQt/PySide that does not require Numpy?
What I need to plot is simple sequential data. For instance a sensor delivers a temperature every second and I want to see the last 20 temperatures in a y/t diagram.
Idealy a PyQwt without numpy. The PyQwt homepage says NumPy is optional. Is it eventually possible to configure PyInstaller in a way to skip numpy?
Thank you very much for your help!
My System: Windows 7 PythonXY 2.7.10 PyQT4
Upvotes: 2
Views: 2274
Reputation: 10951
Looking at the documentation, down to 3.Fine Tune (Optional):
to the configure.py options.
The configure.py script takes many options. The command:
python configure.py -h
displays a full list of the available options
Then looking at those options, I can see how to disable Numpy
:
Detection options:
--disable-numarray disable detection and use of numarray [default enabled] --disable-numeric disable detection and use of Numeric [default enabled] --disable-numpy disable detection and use of NumPy [default enabled]
So, if you run the following command while you are at the PyQwt
directory, you will be able to disable Numpy
:
$:python configure.h --disable-numarray
If your requirement is to only plot simple sequential data, like sensor reading versus time, I suggest to you PyQtGraph and an example of real time plotting.
A generic example:
import pyqtgraph as pg
pw = pg.PlotWidget(name='My Graph')
horizontalLayout_Plot.addWidget(pw)
x,y = range(10),range(10)
pw.plot(x,y)
Upvotes: 2