![]() ![]() ![]() The simplest way of creating a Figure with an Axes is using pyplot.subplots. Now, the notebook in the remote machine can be used through the browser and plot can be generated using the data in the remote machine. Matplotlib graphs your data on Figure s (e.g., windows, Jupyter widgets, etc.), each of which can contain one or more Axes, an area where points can be specified in terms of x-y coordinates (or theta-r in a polar plot, x-y-z in a 3D plot, etc.). In this example, the port number is 8080.Ĭopy and paste the URL in the step 3 to a browser in your local machine (B). Now open another terminal in the local machine (B) and connect to the remote machine (A) using ssh: ssh -N -L 8080:localhost:8080 port number has to be same in step 2 and step 3. Jupyter notebook -no-browser -port=8080Īfter this command, a URL will be given something similar to below: Run Jupyter with no browser from the code directory in the remote machine (A): cd PATH/TO/THE/CODE Update matplotlib: pip install -user -U matplotlib On MacOS, you should either install XQuartz for MacOS 10.9 or later or install the Anaconda Python distribution in order to get a fully functional PyPlot. Step 1: Install IPython and Jupyter in the remote machine (A) locally (assuming no root privilege) using the following commands: pip install -user ipython I have used IPython to solve the related problem. Other useful troubleshooting tips on using ssh -X : Make sure you call e BEFORE importing anything else from matplotlib (e.g. > e('GTKAgg') #I had to use GTKAgg for this to work, GTK threw errors When connecting the Raspberry Pi, if the driver board has a 40pin header. Then from your local machine, use ssh -X to remote into remote machine A: ssh -X on the remote machine: python Provide BCM2835, WiringPi, file IO, RPI (Python) library demos. If it's not set, make sure you've logged in/out since installing X11 from XQuartz. It should open up X11 window.Īt this point your $DISPLAY variable should also be set correctly. If you have an issue running the latest version of opencv on Raspberry Pi, it can sometimes work to. Then logout and log back in to your mac.Īfter you log back in, try to run xterm command again. sudo apt-get install python-opencv pip install -U numpy. If it says command not found, then go to and install X11 server. If an X11 window opens up, you're all set. Check if you have X11 by opening up Mac terminal, and run command xterm. If you're running a recent version of Mac OSX (OS X Mountain Lion or newer), it would NOT have come with X11 pre-installed (see ). ![]() You need X11 server installed on your local machine to do this. The following worked for me using Mac OS X on the local machine (machine B) and ubuntu on the remote (machine A). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |