--
--
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/d/optout.
ggplot(data, aes(x = interaction(month, year) y= value)Thanks for your reply.I'm still not clear how to do it. Should I combine the year and month to year-month format first, such as 1993-01, 1993-02, etc?
yes, as Shreya said. tidy it first please. you will need to use the function gather()
On Fri, Oct 12, 2018 at 7:21 AM Shreya Agarwal <shrey...@gmail.com> wrote:
Hi Lily,The dataset you're referring to is not tidy (vertical data). Once you have months as columns and all the values under another separate column, you'll have clearly defined x-values and y-values. Hope that helps.To tidy the data: http://garrettgman.github.io/tidying/(scroll down to 'spread' and 'gather' part on the webpage shared above)Please let me know if you have any questions.Thanks,Shreya
On Fri, Oct 12, 2018 at 10:06 AM lily li <choc...@gmail.com> wrote:
--Hi ggplot users,I have a dataset like this exactly.How to draw time series of x-axis as monthly data, such as 1993-01, 1993-02, ..., 1993-12, 1994-01, ..., 1994-12, etc. Then y-axis as the values in ggplot2? I searched online, and one way seems to compile the dataset as 1993-01-01, 1993-02-01, etc, and then plot it as monthly values. But I see if there is a way to plot the monthly data directly? Thanks for any kind of help.
--
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 ggp...@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 ggp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Regards,
Shreya Agarwal"A setback is nothing but a setup for a comeback!"
--
--
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 ggp...@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 ggp...@googlegroups.com.