File:Geom smooth ex.png: Difference between revisions

From 太極
Jump to navigation Jump to search
(<pre> library(dplyr) #group the data by cyl and create the plots mpg %>% group_by(cyl) %>% ggplot(aes(x=displ, y=hwy, color=factor(cyl))) + geom_point() + geom_smooth(method = "lm", se = FALSE) + theme(legend.position="none") </pre>)
 
(No difference)

Latest revision as of 15:40, 15 December 2022

Summary

library(dplyr)
#group the data by cyl and create the plots
mpg %>% 
  group_by(cyl) %>% 
  ggplot(aes(x=displ, y=hwy, color=factor(cyl))) + 
  geom_point() + 
  geom_smooth(method = "lm", se = FALSE) + 
  theme(legend.position="none")

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:40, 15 December 2022Thumbnail for version as of 15:40, 15 December 20222,400 × 1,800 (110 KB)Brb (talk | contribs)<pre> library(dplyr) #group the data by cyl and create the plots mpg %>% group_by(cyl) %>% ggplot(aes(x=displ, y=hwy, color=factor(cyl))) + geom_point() + geom_smooth(method = "lm", se = FALSE) + theme(legend.position="none") </pre>

The following page uses this file:

Metadata