I am relatively new to python / matplotlib and have to plot huge numpy arrays (more than 6 mio entries). The problem is that the 6 plots I have take more than 3 GB of RAM and take very long to load. I researched a bit and found out that I can speed matplotlib up by not loading the axes and title every time. So now the code looks like this but it's still quite slow.
Should I use another module instead of matplotlib? How could I speed up the process?
Thanks a lot in advance
for key, typus in self.sensorObjects.items():
fig, ax = plt.subplots()
ax.set_title(key)
ax.set_xlabel('t (ms)')
ax.set_ylabel(self.sensorObjects[key][0].unit)
for sensor in typus:
data = sensor.physical_data
ax.plot(data)
fig.canvas.update()