Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I show a python plot? (Question) #393

Open
AndroidDesigner opened this issue Mar 1, 2024 · 2 comments
Open

How can I show a python plot? (Question) #393

AndroidDesigner opened this issue Mar 1, 2024 · 2 comments

Comments

@AndroidDesigner
Copy link

AndroidDesigner commented Mar 1, 2024

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?

@dylanhillier
Copy link

dylanhillier commented Mar 20, 2024

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).

@ardera
Copy link
Owner

ardera commented Mar 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants