Gradient color selection with matplotlib

――It's troublesome to change each time, but there are many parameters ――I want to change it in a gradation

import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
x =np.linspace(0,2*np.pi,100)
for i in range(30):   
    plt.plot(x,i*np.sin(x),color=cm.hsv(i/30.0))
plt.xlim(0,2*np.pi)
plt.savefig("cm.png ")
plt.show()

Cm list for color reference

――Illustrated what I tried to change the place of cm.hoge earlier -It has a gradation of [0,1], with 0 being the flattest and 1 being raised.

Please use it as a reference for visualization

Royal road colorful system

hsv.png

jet.png

spectral.png

Monochromatic shade (like)

bone.png

gray.png

pink.png

copper.png

Multi-color gradation system

cool.png

hot.png

Seasonal colors

spring.png

summer.png

autumn.png

winter.png

System that does not become gradation

flag.png

prism.png

--Other: http://matplotlib.org/examples/color/colormaps_reference.html

Recommended Posts

Gradient color selection with matplotlib
Continuously color with matplotlib scatter plot
Set the xticklabels color individually with matplotlib
Animation with matplotlib
Japanese with matplotlib
Animation with matplotlib
Histogram with matplotlib
Animate with matplotlib
2-axis plot with Matplotlib
Heatmap with Python + matplotlib
Band graph with matplotlib
Learn with Cheminformatics Matplotlib
Real-time drawing with matplotlib
Various colorbars with Matplotlib
3D plot with matplotlib
Adjust axes with matplotlib
matplotlib Color list creation
Graph Excel data with matplotlib (1)
Try using matplotlib with PyCharm
Graph drawing method with matplotlib
matplotlib gallery and color map
Graph Excel data with matplotlib (2)
Animate multiple graphs with matplotlib
Create plot animation with Python + Matplotlib
A python graphing manual with Matplotlib.
Inference & result display with Tensorflow + matplotlib
Japaneseize Matplotlib with Alpine using Docker
[Python] font family and font with matplotlib
Solving 4-color problems with combinatorial optimization
Draw Japanese with matplotlib on Ubuntu
Draw a loose graph with matplotlib
Versatile data plotting with pandas + matplotlib
Gradient boosting tree modeling with xgboost
Manipulate colors with pip install color
Heatmap with Dendrogram in Python + matplotlib
Easy Japanese font setting with matplotlib
Easy to draw graphs with matplotlib
Draw Lyapunov Fractal with Python, matplotlib
When matplotlib doesn't work with python2.7
Lognormal probability plot with Python, matplotlib
Easy animation with matplotlib (mp4, gif)
Write a stacked histogram with matplotlib
Implement "Data Visualization Design # 2" with matplotlib