[PYTHON] Drawing graphs on Windows10 + Julia + PyPlot

Note: The information in this article is out of date

[Added on October 24, 2017]

The information below is very old and now

Install Julia → Pkg.add ("PyPlot ") → ʻusing PyPlot`

OK. All necessary matplotlib etc. are automatically installed via anaconda.

If you want to use matplotlib etc. that already exists when you newly install Julia or PyPlot with matplotlib etc. already installed, it seems that some settings are required, so please check by yourself.

[Updated on October 24, 2017]

The following is old information

There is already an article existing that installs Julia and PyPlot on Windows and draws a graph, but since the information is old, it also serves as a memo for myself. To write a new one. The author's environment is Windows10 64bit.

Install python

Download and install what you need from the Official Site. I installed the 64-bit version of Python 2.7, but I haven't confirmed if it's okay with the Python 3 series. By default, the installer does not pass Path, so pass Path.

update pip

All you need is pip in the required packages. pip should be included when you install Python by default, so you don't need to install anything new.

First of all,

pip install -U pip

Update pip itself with.

Install matplotlib

next,

pip install -U matplotlib

Install matplotlib with. At this time, ** all dependent packages are also installed **, so there is no need to install additional numpy etc. If you are worried

pip install -U package name

You can find what you need in (matplotlib Installation Guide,

setuptools, numpy, python-dateutil, pytz, pyparsing, and cycler

Etc.) should check if it is the latest version.

Install Julia

This is also downloaded from the Official Site and installed. However, ** Python and the number of bits (?) Must be matched **. For example, if the installed Python is a 64-bit version, Julia also installs the 64-bit version. I think it's better to install it directly under the C drive just in case (but I'm not sure if this makes sense).

Install PyPlot

Start Julia and on the command line

Pkg.add("PyPlot")

After a while, the installation should be completed. This is OK only once.

If something goes wrong and the installation is unsuccessful, after resolving the issue,

Pkg.build("PyPlot")

To execute.

Include PyPlot

When you actually want to use PyPlot, on Julia

using PyPlot

To execute. Once you run it, you don't have to run it again until you quit Julia. If you restart Julia, run it when you need it.

Usage example

After executing ʻusing PyPlot`, the graph of $ y = \ sin x $ should be drawn.

x = linspace(0, 2*pi, 100);
y = sin(x);
plot(x, y)

Recommended Posts

Drawing graphs on Windows10 + Julia + PyPlot
Python on Windows
Pylint on Windows Atom
Linux (WSL) on Windows
Until drawing a 3D graph in Python on windows10
Use pyvenv on Windows
Labeled graphs on NetworkX
Anaconda on Windows Terminal
Install Anaconda on Windows 10
python basic on windows ②
Install python on windows
Install pycuda on Windows10
Build TensorFlow on Windows
Try FEniCS on Windows!
Build XGBoost on Windows
Install pygraphviz on Windows 10
Use Ansible on Windows
Try Poerty on Windows
Install Chainer 1.5.0 on Windows
Use QuTiP on Windows
Use pip on Windows
Install Numpy on virtualenv on Windows
Set-enable Python virtualenv on Windows
Run Jupyter on Ubuntu on Windows
Run Openpose on Python (Windows)
Install watchdog on Windows + Python 3.3
Install Win-Kex (kali-linux) on Windows 10.
Before trying Veriloggen on Windows
Install cvxpy on windows, Anaconda
Python + Kivy development on Windows
Prepare Chainer environment on Windows
Try using OpenCV on Windows
F2py on Miniconda for Windows
Real-time graphs on Plotly (Python)
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Make Cython available on Windows.
Fastest Python installation on Windows
Operate ubuntu on VScode (windows10)
Build Python environment on Windows
Django environment development on Windows 10
Install Chainer 1.6 (GPU) on Windows 7.
Build python environment on windows
Set up Polyglot on Windows
Linux on Windows -1-: debian introduction
I ran python on windows
[Tensorflow] Tensorflow environment construction on Windows 10
Notes on installing Anaconda 3 on Windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Use Python on Windows (PyCharm)
Run Jupyter Notebook on windows
Use Linux on Windows 10 (WSL2)
Blogging with Pelican on Windows