It would be nice if in matplotlib you could show graphs with the whole native ui thing like you would on a desktop
@JesterOrNot Thanks a lot for the great suggestion!
Quick question: Maybe basing your .gitpod.yml on image: gitpod/workspace-full-vnc would be sufficient?
This will give you a VNC Remote Desktop, and I suspect that Matplotlib will then detect the X server and show its native windows in there.
I did this was the error I got
graphQuadMod.py:23: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
https://gitpod.io/#github.com/JesterOrNot/pycalc
@JesterOrNot Hi again, sorry for the delayed reply. I'm looking into getting Matplotlib to work.
What specific steps do you follow in order to trigger the Matplotlib graphing code? I tried:
cd algeb/graph/
python3 main.py
but I'm not sure what values to give it so that it plots a graph?
Also, FYI, I had to make a few changes to the Gitpod setup in my fork to make it work: https://github.com/jankeromnes/Python-Calc/commit/8e134dc561cbecb3ccb9a5cfb2ec04c41dde9cef
Maybe this can be useful to you. 馃檪 I'm happy to send you a Pull Request.
Thanks a lot @JesterOrNot! I was now able to reproduce the problem:
gitpod /workspace/Python-Calc/algeb/graph $ python3 graphQuadMod.py
What is the equasion type vertex form or standard form
Which one do you want?: vertex
What is a?: 1
What is h?: 1
What is k?: 1
graphQuadMod.py:41: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
Will look into making Matplotlib use the graphical environment instead.
EDIT: I'm now trying to make Matplotlib use TkAgg instead of agg, however installing Tk is tricky, because we install Python via pyenv (so sudo apt-get install python3-tk doesn't work).
EDIT 2: Alternatively, you can also save the plot into a .png image like so: https://github.com/tctianchi/pyvenn/issues/3#issuecomment-414562934 and then use gp open plot.png to show it in Gitpod.
@JesterOrNot It finally worked! 馃帀

And here is the PR with my changes: https://github.com/JesterOrNot/pycalc/pull/15
Great it works perfectly thank-you I'm Going to close this issue