flutter-pi
flutter-pi copied to clipboard
How can I show a python plot? (Question)
Hi everyone.
I need to run a python code using process_run to plot something by matplotlib
python package, but flutter-pi runs without X11.
Therefore, my python command executes but no plot can be shown.
So what do I have to do?
You could probably not use flutter-pi, but instead build your flutter app so that it runs on X11? Or you could run the process to generate an image instead of attempting to load the plot through an X11 window, then just display the window.. Or you could instead of trying to use matplot lib, just output a CSV temp file, then use a flutter graphing library to display the plot (assuming its simple).
If the plot isn't interactive, you could also save the plot as a png in python and use an Image widget in flutter to show it.