(R) scatter dot plot/ distinguish by discrete colour/by shape/ by colour and shape/ by filling and vacant
> ?USJudgeRatings> mean(USJudgeRatings$PREP)[1] 7.467442 > mean(USJudgeRatings$INTG)[1] 8.02093 > USJudgeRatings_%mutate(INTGR=ifelse(INTG>8.02,"HIGH","LOW"),PREPR=ifelse(PREP>7.46,"LONG","SHORT")) > ggplot(data=USJudgeRatings,aes(x=DILG,y=FAMI))+geom_point()> ggplot(data=USJudgeRatings,aes(x=DILG,y=FAMI))+geom_point(shape=3) > ggplot(data=USJudgeRatings_,aes(x=DILG,y=FAMI,colour=PREPR))+geom_po..
2020. 8. 25.
(R)The way to make "Stacked Area Graph" / The way to switch the order of legend and stack/geom_area()
> data_frame_1 View(data_frame_1) > ggplot(data=data_frame_1,aes(x=Year,y=Freshmen,fill=Sex))+geom_area() > ggplot(data=data_frame_1,aes(x=factor(Year),y=Freshmen,fill=Sex,group=Sex))+geom_area() elements of Year in the graph is 2007.5, 2010.0 ... difficult to decode the graph. elements of factor(Year) in the graph is 2008,2010,2012,2014,2016,2018,2020 > data_frame_2View(data_frame_2) > ggplot(d..
2020. 8. 24.