Put Scipy + Matplotlib in Ubuntu on Vagrant and display the graph with X11 Forwarding

environment

procedure

Install XQuartz

Install this on your Mac http://xquartz.macosforge.org/landing/

Edit Vagrantfile

Vagrantfile


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.ssh.forward_x11 = true    #Add this
end

Install X11, Matplotlib, NumPy, SciPy, IPython on Ubuntu

python


$ vagrant up
$ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get update
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install -y xorg python-matplotlib python-numpy python-scipy ipython

Restart Ubuntu and display graph

python


$ vagrant reload
$ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ ipython --pylab
In [1]: import matplotlib.pyplot as plot
In [2]: import scipy as sp
In [3]: x = sp.arange(1,100)
In [4]: plot.scatter(x, x**2)

Screen Shot 2014-11-20 at 8.37.51 PM.png

When X11 Forwarding doesn't work

When you do vagrant ssh

/home/vagrant/.Xauthority not writable, changes will be ignored

If you see, delete ~ / .Xauthority * and try logging in again.

Recommended Posts

Put Scipy + Matplotlib in Ubuntu on Vagrant and display the graph with X11 Forwarding
Put Ubuntu in Raspi, put Docker on it, and control GPIO with python from the container
Install matplotlib and display graph on Jupyter Notebook
Display the graph while changing the parameters with PySimpleGUI + Matplotlib
Put Python 3.x on Ubuntu
[Python] Read the csv file and display the figure with matplotlib
Create SVG graph with matplotlib on heroku (displayed in Japanese)
Draw Japanese with matplotlib on Ubuntu
Install Chrome on the command line on Sakura VPS (Ubuntu) and launch Chrome with python from virtual display and selenium
Put Cabocha 0.68 on Windows and try to analyze the dependency with Python
Put OpenCV in OS X with Homebrew and input / output video with python
Install NumPy, SciPy, Matplotlib with Homebrew on OS X (as of November 2015)
Create a Python3 environment with pyenv on Mac and display a NetworkX graph
[Python] Set the graph range with matplotlib
Display Python 3 in the browser with MAMP
Display Matplotlib xy graph in PySimple GUI.
Display the graph of tensorBoard on jupyter
Graph trigonometric functions with numpy and matplotlib
Display markers above the border with matplotlib
Compiling the Linux kernel (Linux 5.x on Ubuntu 20.04)
I installed Pygame with Python 3.5.1 in the environment of pyenv on OS X
Use libsixel to output Sixel in Python and output a Matplotlib graph to the terminal.
Drawing tips with matplotlib on the server side
Increase the font size of the graph with matplotlib
DISPLAY error in wxPython (and traitsui) on vscode
When the axis and label overlap in matplotlib
Put Python 2.7.x on Mac OSX 10.15.5 with pyenv
Put the second axis in 2dhistgram of matplotlib
The basis of graph theory with matplotlib animation
Graph drawing with jupyter (ipython notebook) + matplotlib + vagrant
[Don't refer to 04.02.17] Display the temperature sensor on a real-time graph with rasberry pi 3.
I created a stacked bar graph with matplotlib in Python and added a data label
Read the csv file with jupyter notebook and write the graph on top of it
Complement the library you put in anaconda with jedi-vim
[Python] Get the numbers in the graph image with OCR
Implement Sign In With Google on the backend side
Omit the decimal point of the graph scale in matplotlib
Read the csv file and display it in the browser
Set up Docker on Oracle Linux (7.x) with Vagrant
Conv in x direction and deconv in y direction with chainer
Ubuntu 20.04 on raspberry pi 4 with OpenCV and use with python
Execute the command on the web server and display the result
Install Ubuntu 20.04 with GUI and prepare the development environment
Dealing with pip and related installation errors on Ubuntu 18.04
Display / update the graph according to the input with PySimpleGui
Draw the frequency response on the complex plane with Matplotlib and NumPy, and also draw the amplitude / phase characteristics
"Deep Learning from scratch" Self-study memo (Part 8) I drew the graph in Chapter 6 with matplotlib
When generating a large number of graphs with matplotlib, I do not want to display the graph on the screen (jupyter environment)