Color Ylabel Python at Color

Color Ylabel Python. Import numpy as np import matplotlib. Python code for colorbar label.

python matplotlib pyplot colorbar question Stack Overflow
python matplotlib pyplot colorbar question Stack Overflow from stackoverflow.com

Earlier we saw a tutorial, how to add colors to data points in a scatter plot made with matplotlib‘s scatter() function. Title ('title', fontweight = 'bold') plt. Import matplotlib.pyplot as pl x = [1,2,3] y = [4,5,7] pl.plot (x,y) pl.xlabel (x coordinates) pl.ylabel ('y coordinates') pl.title (matplotlib tutorial 2) pl.show () in the above code, we have used.

python matplotlib pyplot colorbar question Stack Overflow

Here, we used a list of 6 colors. Arange (50) y = np. You can read more about them here (matplotlib) and here (numpy). Matplotlib, one of the powerful python graphics library, has many way to add colors to a scatter plot and specify legend.