[PYTHON] Try using matplotlib

matplotlib is a data visualization library that can be easily used in a Linux environment. The simplest pattern graph introduced in Official Tutorial is as follows. Code can be written.


import matplotlib.pyplot as plt

fig, ax = plt.subplots()  # Create a figure containing a single axes.
ax.plot([1, 2, 3, 4], [1, 4, 2, 3])  # Plot some data on the axes.

plt.show()

If you get an error such as the module not found, use the following procedure (such as pip) to install it.


sudo pip3 install matplotlib

Since numpy and pandas are often used together, it may be convenient to include them.


import numpy as np
import pandas as pd

Recommended Posts

Try using matplotlib
Try using matplotlib with PyCharm
Try using Tkinter
Try using docker-py
Try using cookiecutter
Try using PDFMiner
Try using geopandas
Try using Selenium
Try using scipy
Try using pandas.DataFrame
Try using django-swiftbrowser
Try using tf.metrics
Try using PyODE
Graph drawing using matplotlib
Try using virtualenv (virtualenvwrapper)
I tried using matplotlib
[Azure] Try using Azure Functions
Try using W & B
Try using Django templates.html
[Kaggle] Try using LGBM
Try using Python's feedparser.
Try using Python's Tkinter
Try using Tweepy [Python2.7]
Try using Pytorch's collate_fn
Try drawing contour plots using matplotlib in OpenFOAM
Try using PythonTex with Texpad.
Try using Jupyter's Docker image
Try using scikit-learn (1) --K-means clustering
Try function optimization using Hyperopt
Try using Kubernetes Client -Python-
[Kaggle] Try using xg boost
Try using the Twitter API
Try using OpenCV on Windows
Try using Jupyter Notebook dynamically
Try using AWS SageMaker Studio
Try tweeting automatically using Selenium.
Try using SQLAlchemy + MySQL (Part 1)
Try using the Twitter API
Data visualization method using matplotlib (1)
Try using SQLAlchemy + MySQL (Part 2)
Try using Django's template feature
Try using the PeeringDB 2.0 API
Data visualization method using matplotlib (2)
Try using Pelican's draft feature
Try using pytest-Overview and Samples-
Try using folium with anaconda
[Statistics] [R] Try using quantile regression.
Try using design patterns (exporter edition)
Try using Pillow on iPython (Part 1)
Japaneseize Matplotlib with Alpine using Docker
Data visualization method using matplotlib (+ pandas) (5)
Try using Pillow on iPython (Part 2)
Try using Pleasant's API (python / FastAPI)
Try using LevelDB in Python (plyvel)
Try using pynag to configure Nagios
Try using PyCharm's remote debugging feature
Try using ArUco on Raspberry Pi
Try using cheap LiDAR (Camsense X1)
[Sakura rental server] Try using flask.
Data visualization method using matplotlib (+ pandas) (3)
Try using Pillow on iPython (Part 3)