nrows^2), it will need adjustment to make the sum to 100. # NOTE: if sum(categ_table) is not 100 (i.e. Var 2seater compact midsize minivan pickup subcompact suv #> 2 20 18 5 14 15 26 df $ category <- factor( rep( names( categ_table), categ_table)) Panel.background = element_rect( fill = " #f7f7f7"), Plot.background = element_rect( fill = " #f7f7f7"), Health $ Area <- factor( health $ Area, levels = as.character( health $ Area)) # for right ordering of the dumbells # health$Area <- factor(health$Area) gg <- ggplot( health, aes( x = pct_2013, xend = pct_2014, y = Area, group = Area)) + geom_dumbbell( color = " #a3c4dc",Ĭolour_x = " #0e668b") + scale_x_continuous( label = percent) + labs( x = NULL,Ĭaption = " Source: ") + theme( plot.title = element_text( hjust = 0.5, face = " bold"), # devtools::install_github("hrbrmstr/ggalt") library( ggplot2) Values = c( " green" = " #00ba38", " red" = " #f8766d")) + # color of lines labs( x = " ", y = " Mean GdpPerCap") + # Axis labels xlim(. 1) + scale_color_manual( labels = c( " Up", " Down"), 1) + geom_vline( xintercept = 2, linetype = " dashed", size =. 75, show.legend = F) + geom_vline( xintercept = 1, linetype = " dashed", size =. Left_label <- paste( df $ continent, round( df $ `1952`), sep = ", ")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |