Learn practical skills, build real-world projects, and advance your career
alt

Pic Credit :bids.github.io

Colormaps in matplotlib

Visual Storytelling is an integral part of Data scientists job. Matplotlib is one of the most popular python library for 2D visualization which can be used to create scatterplots, bar charts, histograms, and more.
The plots can be made more colorful using the predefined colormaps—sets of RGBA colors that are built into matplotlib and you can also create your own customized colormaps in matplotlib . Colormaps makes your plots and graphs more visually appealing and more accessible. This notebooks explores various ways in which you can customize your plots using colormaps

#Importing libraries and loading UCI heart diseases dataset
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("../input/heart-disease-uci/heart.csv")

Basic ScatterPlot

#plot
plt.scatter( df['trestbps'], df['chol'], s = df['thalach']*0.5 , color = 'red' , alpha = 0.5)
<matplotlib.collections.PathCollection at 0x7f656fa3cc50>
Notebook Image