Hi All,
I have created a plot using ggplot which only shows 3 values from a total of
12. How can I force ggplot to show all values of x-axis? Sample data and code
found below
structure(list(df
= c(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
variable = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L), .Label = c("est", "lcl",
"ucl"), class = "factor"),
value = c(0.00531397286604541, 0.00465302613078271, 0.00599206328501424,
0.0063936544582357, 0.00583732007007508, 0.00570938070638182,
0.00508940797065789, 0.00499908774197153, 0.00535179179636405,
0.00504072124147188, 0.00179543852941809, 0.00100094651094594,
0.00227307755709763, 0.0026302975491651, 0.00204051039581486,
0.00188950350263121, 0.00125031219694319, 0.00113596705257451,
0.00145629986966463, 0.00112650714659818, 0.00883250720267273,
0.00830510575061949, 0.00971104901293084, 0.0101570113673063,
0.00963412974433531, 0.00952925791013243, 0.00892850374437259,
0.00886220843136856, 0.00924728372306347, 0.00895493533634557
)), .Names = c("df", "variable", "value"),
row.names = c(NA,
-30L), class = "data.frame")
ggplot(data=df, aes(x=df, y=value, group=variable)) + geom_line(aes(color=variable))
Many thanks
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.