r - Vertical Line ggplot for x categorical variable (not date) -
i have dataframe i'm trying make vertical line on x-axis categorical.
data <- data.frame( condition = c('1', '1', '1', '1', '1', '2', '2', '2', '2', '2', '3', '3', '3', '3', '3'), assessmentgrade = c('400', '410', '420', '430', '440', '500', '510', '520', '530', '540', '300', '310', '320', '330', '340'), freq = c('1', '2', '1', '5', '7', '9', '1', '5', '3', '4', '5', '8', '1', '3', '5'), mathgrade = c('a+', 'b-', 'c-', 'd', 'f', 'a-', 'b', 'c+', 'd-', 'f', 'a+', 'd', 'd', 'f', 'c'), condition = c('condition 1', 'condition 1', 'condition 1', 'condition 1', 'condition 1', 'condition 2', 'condition 2', 'condition 2', 'condition 2', 'condition 2', 'condition 3', 'condition 3', 'condition 3', 'condition 3', 'condition 3'))
i tried adding field make grade numeric , helped
data$gradenum <- as.numeric(data$mathgrade)
i used ggplot abubble graph wondering how edit use company's standard colors
p <- ggplot(data, aes(x = mathgrade, y = assessmentgrade, size = freq, fill = condition)) + geom_point(aes(colour = condition)) + ggtitle("main title") + labs(x = "first math grade", y = "math assessment score")
how can vertical line between c+ , d? see lot of information out there if x axis date not other categorical values
Comments
Post a Comment