Unsolved How to show plots(Matlablib) on Qlabel Pyqt5
-
hi all,
How i can show plots(Matlablib) on Qlabel Pyqt5?
for example this is the plots with i make Matlablib:
i want to show this grap on Qlabel(some image)
tnx! -
@Dl10 It's not clear: do you want to show a plot which is stored as a picture or do you want to plot in your app?
-
i want to show plot on Qlabel in my app
-
@Dl10 So, a picture? I'm still not sure what you exactly mean.
If it is a picture use http://doc.qt.io/qt-5/qlabel.html#pixmap-prop
or http://doc.qt.io/qt-5/qlabel.html#setPicture
If you really want to plot take a look at https://doc.qt.io/qt-5.10/qtcharts-overview.html
QLabel can't plot. -
the photo in my first commend i want to put in label.
i don't want "pop up" show graph i want the graph on Qlabel -
@Dl10
Hi
But how do you generate the image you want to show in the QLabel ? -
@mrjj said in How to show plots(Matlablib) on Qlabel Pyqt5:
Hi
But how do you generate the image you want to show in the QLabel ?way --> from matplotlib import pyplot
my code:
pyplot.plot(Matrix)
pyplot.show()
and what this show i want to put on Qlabel -
@Dl10 Then I guess you need to use something like pyplot.save() instead of show(). I don't know whether it provides the possibility to save the plot as a picture.
-
Hi
Seems @jsulm has metal powers
I think you can use this t get image
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imsave.html#matplotlib.pyplot.imsave -
@Dl10 please watch following video to use Matplotlib with PyQt5