import the library and the dataset available in rstudio mtcars

create a scatterplot using the data from the dataset imported where we lab x and y axis using labs

scatterplot <- ggplot(mtcars,aes(x=hp, y=mpg,color =factor(cyl)))+
  geom_point()+
   labs(
     title="scatter plot of mpg vs horsepower",
     y="mpy",
     x="horepower",
     color="number of cylinder"
   )+
  theme_minimal()

Displaying of the scatterplot created