0

I am pretty new to Pycharm (community edition), which I am using via Thinlinc client on a remote desktop server. The issue I am having is that I am not able to create interactive plots. On my local computer with Canopy, after importing matplotlib and calling the plot( ... ) command on the console with some variable X inside, the plot window opens.

However, in my remote machine on the Pycharm console, calling plot() does not give errors, but does not open a window (not even when calling .show()). By contrast, plt.savefig() works perfectly. I tried to get the following info:

    matplotlib.is_interactive()
    Out[8]: True
    matplotlib.get_backend()
    Out[10]: 'agg'
GWSurfer
  • 31
  • 9
  • @DavidG : switching off interactive mode is not working for me. `plot(x,yy)` `Out[15]: []` `plt.show()` `matplotlib.is_interactive()` `Out[17]: False` – GWSurfer May 30 '18 at 10:53
  • The `agg` backend never opens a window. If your remote machine has a display variable set you should be able to choose another backend, like `"TkAgg"` or `"Qt5Agg"` to then get a GUI upon calling `plt.show()`. – ImportanceOfBeingErnest May 30 '18 at 10:56
  • @ImportanceOfBeingErnest : ok, good to know! Is there a way to list all available backends? EDIT: found out with `matplotlib.rcsetup.interactive_bk`, cbut is there a way to change backend even after having imported pylab? – GWSurfer May 30 '18 at 10:59
  • https://stackoverflow.com/questions/5091993/list-of-all-available-matplotlib-backends – ImportanceOfBeingErnest May 30 '18 at 11:01

0 Answers0