Matplotlib: display plot on a remote machine

Sure, you can enable X11 forwarding. Usually this is done by passing the -X or -Y option to ssh when you connect to the remote computer

ssh -X computerA

Note that the SSH daemon on computer A will also have to be configured to enable X11 forwarding. This is done by putting

X11Forwarding yes

in computer A’s sshd_config configuration file.

If computer A’s SSH daemon does not have X11 forwarding enabled, you can always have Python write the result of the calculation to a text file, download it to computer B, and use Matplotlib locally.

Leave a Comment