Separate display of Python graphs (memo)

I want to divide what was displayed as a graph in Python into two

If you unknowingly write a graph in Python, the values on the vertical axis are used together, so a graph with a very large value and a graph with a very small value are displayed together.

image.png

Like this (maybe just me ...)

By the way, the blue legend is the raw data and the orange legend is the slope.

This is divided into two graph displays.

subplot

The subplot function was used to regularly display multiple items on the graph.

subplot(Number of lines,Number of columns,Plot number)

The figure is divided by the number of rows ☓ the number of columns. The plot numbers increase from the first line to the right. By the way, I used 2 rows and 1 column this time, so the plot number is

Plot number
1
2

It becomes.

The actual code is

#Creating a figure
fig = plt.figure()
plt.subplot(2,1,1)
plt.plot(data7)#Raw data

…

plt.subplot(2,1,2)
plt.plot(huge7)#Tilt

Some parts are omitted on the way. The actual result is image.png

The top is the raw data and the bottom is the slope. Since the vertical axis is coarse memory, it is necessary to process it from now on.

For the time being, it is a memo for myself, so I wrote only the key part this time.

Recommended Posts

Separate display of Python graphs (memo)
[Python] Operation memo of pandas DataFrame
Python memo
python memo
Python memo
Waveform display of audio in Python
Python3 compatible memo of "python start book"
python memo
Python memo
Python memo
Python memo
[Learning memo] Basics of class by python
Display a list of alphabets in Python 3
Memo of troubles about coexistence of Python 2/3 system
Introduction of Python
python beginner memo (9.2-10)
python beginner memo (9.1)
★ Memo ★ Python Iroha
Basics of python ①
Copy of python
[Python] EDA memo
Python 3 operator memo
[My memo] python
Python3 metaclass memo
[Python] Basemap memo
Python beginner memo (2)
[Python] Numpy memo
Introduction of Python
A memo of a tutorial on running python on heroku
Python & Machine Learning Study Memo ⑤: Classification of irises
Python & Machine Learning Study Memo ②: Introduction of Library
Get the update date of the Python memo file.
[Python] Operation of enumerate
List of python modules
Python class (Python learning memo ⑦)
My python environment memo
python openCV installation (memo)
A memo connected to HiveServer2 of EMR with python
Python module (Python learning memo ④)
Visualization memo by Python
Unification of Python environment
Copy of python preferences
Basics of Python scraping basics
[python] behavior of argmax
Python test package memo
[Python] Memo about functions
Usage of Python locals ()
the zen of Python
Binary search (python2.7) memo
Installation of Python 3.3 rc1
[My memo] python -v / python -V
The pain of gRPC using Python. November 2019. (Personal memo)
Python3 List / dictionary memo
[Memo] Python3 list sort
Python Tips (my memo)
[Python] Memo about errors
Python basic memo --Part 2
Basic Python command memo
# 4 [python] Basics of functions
Python OpenCV tutorial memo
Basic knowledge of Python