I have the following plot
require(ggplot2)
dtf <- structure(list(Variance = c(5.213, 1.377, 0.858, 0.613, 0.412, 0.229, 0.139, 0.094, 0.064), Component =
This would plot the points with x as the integer values of the factor categories:
ggplot(dtf, aes(x = as.numeric(Component), y = Variance)) +
geom_point() + geom_line()
You can put back in the category labels with:
ggplot(dtf, aes(x = as.numeric(Component), y = Variance)) +
geom_point() +geom_line() + scale_x_discrete(labels=dtf$Component)