Often times, I ssh into another computer to do python work. While I'm coding, I like to have an ipython shell open for quick testing. For some reason, I cannot get matplotlib to open figures. Here is an example:
[mwoods@linux_box ~]$ ssh -X me@mac_machine Password: Last login: Fri Dec 15 13:03:37 2017 mwoods:~ /path/to/ipython Python 3.6.3 |Anaconda, Inc.| (default, Oct 6 2017, 12:04:38) Type ‘copyright’, ‘credit’ or ‘license’ for more information IPython 6.1.0 — An enhanced Interactive Python. Type ‘?’ for help. In : import matplotlib as mpl In : mpl.use('Agg') In : import matplotlib.pyplot as plt In : import numpy as np In : plt.ion() In : plt.imshow(np.random.rand(8, 8)) Out: <matplotlib.image.AxesImage at hex_number> In :
No plot opens. As shown, I start from a linux box and ssh into a Macintosh (I have admin privileges on the mac). The mac runs on macOS Sierra (10.12.6) and has Anaconda version 5.0.1 installed. Other X11 forwarding commands (e.g. xpdf, display) work over the same ssh connection, so I don't think it has to do with the ssh_config or sshd_config files on either machine. Could someone please help?