matplotlib under Yocto to display result

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

matplotlib under Yocto to display result

2,082件の閲覧回数
erikraynolds
Contributor IV

I am trying to use matplotlib and display result, I have yocto based image with xWayland backend (fsl-image-qt5).

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-np.pi, np.pi, 256, endpoint=True)
c, s = np.cos(X), np.sin(X)

plt.plot(x, c)
plt.plot(x, s)

plt.show()

After running this script plot is not displayed. How to make it display window?

ラベル(2)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,934件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Erik Raynolds,

Matplot is not part of the i.MX BSP so I haven’t tested it but I would recommend first making sure that matplot is compatible with Wayland as the problem may be that the library is not reaching the backend. Maybe the matplot documentation or matplot related forums may be useful to check this.

Regards,

0 件の賞賛
返信

1,934件の閲覧回数
erikraynolds
Contributor IV

So assuming yes it's part of - since I just added to local.conf and is within python ...

0 件の賞賛
返信

1,934件の閲覧回数
timofey_babitsk
Contributor I

Hello Erik! Sorry for replying on old post, but I'm having similar issue using Qt5Agg backend and Yocto on i.MX7. I tried Matplotlib, pyqtchart and pyqtgraph, but neither of them display the plot. Matplotlib just have white area instead of the plot (but window and Toolbar is displayed ok), QChart display's line series sometimes (not properly scaled though) but no axes, pyqtgraph just crashes. On the other hand QChart from qml app works fine. I'm using pure samples from documentation of corresponding libraries. They all tested to work under Ubuntu 18.04, but fail on i.MX7. Have you had any luck to solve your issue? If yes, do you recall what was the reason?

0 件の賞賛
返信