Matplotlib memorandum

Overview

Note what you need to remember in Matplotlib (God article There was, maybe I can do it all here lol)

task

1. Line graph

Method

Sample handled in 1

head head head
sample1 sample2 sample3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
10 20 30
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300
100 200 300

1. Line graph

import matplotlib as mpl
import matplotlib.pyplot as plt
df = pd.read_csv("./matplotlib1.csv")
name="sample1" 
x = df.index
y = df[name]
plt.figure(figsize=(6, 4), dpi=72, tight_layout=True)
plt.title('title')
plt.tick_params(bottom=False)
plt.plot(x, y, label=name)
plt.ylabel("value")
plt.xlabel("index")
plt.legend(loc="upper left",bbox_to_anchor=(1, 1))
plt.grid()

output!

sample1-mlp.png

Recommended Posts

Matplotlib memorandum
A memorandum about matplotlib
matplotlib Graph-related memorandum (minimum)
Memorandum @ Python OR Seminar: matplotlib
linux memorandum
jinja2 memorandum
Python memorandum
Django memorandum
Command memorandum
Python Memorandum 2
Matplotlib gallery
Matplotlib memo
plotly memorandum
Slackbot memorandum (1)
multiprocessing memorandum
Memorandum MetaTrader 5
[Linux/LPIC] Memorandum
ShellScript memorandum
pip memorandum
Python memorandum
pydoc memorandum
python memorandum
Pandas memorandum
python memorandum
DjangoGirls memorandum
matplotlib summary
Command memorandum
Python memorandum
pandas memorandum
python memorandum
Python memorandum
Python basics memorandum
RAID type memorandum
Python pathlib memorandum
Translucent matplotlib legend
Knapsack problem memorandum
Memorandum of sed
Python memorandum (algorithm)
Linux memorandum [links]
#Python basics (#matplotlib)
nc command memorandum
Deep Learning Memorandum
I wrote matplotlib
numpy memorandum 1 / np.pad
Revit API memorandum
Animation with matplotlib
My matplotlib (python)
Japanese with matplotlib
Memorandum conda command
Pandas operation memorandum
matplotlib graph album
setuptools command memorandum
Python memorandum [links]
Animation with matplotlib
tslearn trial memorandum
Histogram with matplotlib
Animate with matplotlib
Try using matplotlib
Django's basic memorandum
Memorandum about validation