Answers for "for loop for multiple scatter plot in python"

1

for loop for multiple scatter plots

some_features = ["Hour","Holiday",'Rainfall(mm)','Snowfall (cm)','weekdays_weekend']
count=1
plt.subplots(figsize=(20, 18))
for some_individual_feature in some_features:
    plt.subplot(5,1,count)
    sns.scatterplot(bike_sharing_data["Rented Bike Count"],bike_sharing_data[some_individual_feature])
    count+=1

plt.show()
Posted by: Guest on March-20-2022
1

for loop for multiple scatter plots

count=1
plt.subplots(figsize=(10, 8))
for i in df.columns:
    plt.subplot(3,2,count)
    sns.scatterplot(df["cnt"],df[i])
    count+=1

plt.show()
Posted by: Guest on March-20-2022
0

multiple scatter plots in python

import matplotlib.pyplot as plt

x = range(100)
y = range(100,200)
fig = plt.figure()
ax1 = fig.add_subplot(111)

ax1.scatter(x[:4], y[:4], s=10, c='b', marker="s", label='first')
ax1.scatter(x[40:],y[40:], s=10, c='r', marker="o", label='second')
plt.legend(loc='upper left');
plt.show()
Posted by: Guest on October-23-2020

Code answers related to "for loop for multiple scatter plot in python"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language