Answers for "Scatter graph"

0

scatter plot | create scatter plot

plt.scatter(dataframe['x-axis'], bike_sharing['y-axis'])
plt.xlabel('name')
plt.ylabel('name')
plt.title('title)
plt.show()
Posted by: Guest on August-10-2021
0

Scatter graph

# the iris dataset is provided by R natively

# Create a color palette
library(paletteer)
colors <- paletteer_c(package = "ggthemes", palette = "Green-Blue-White", n = 3)

# Scatterplot with categoric color scale
plot(
  x = iris$Petal.Length, 
  y = iris$Petal.Width,
  bg = colors[ unclass(iris$Species) ],
  cex = 3,
  pch=21
)
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language