mult <- stars |>ggplot(aes(x=magnitude, y=temp, color=type)) +geom_point(size=2) +scale_fill_discrete(name ="Type") +scale_color_manual(values =c("A"="#58508d", "B"="#5096d3", "DA"="#8a508f", "DB"="#dc4093", "DF"="#d164bf", "F"="#ff6361", "G"="#e4395a", "K"="#ffa600","M"="#41d53c", "O"="#233d83" )) +labs(x="Magnitude", y="Temperature(°C)", title="Temperature vs Magnitude of Stars", col ="Spectral Type")+theme(text=element_text(family="NimbusSan")) +theme_dark() mult
I created a scatter-plot using the Stars data set displaying the relationship between a star’s temperature and its magnitude. The plot shows a really interesting non-linear regression that I wanted to show with geom_smooth, but I was unable to create a singular negative exponential curve, so I ultimately deleted that line of code.