Alex,
A reproducible example would be useful. But:
1) A clustered bar chart can be done using geom_bar( position="dodge"
). See ?geom_bar. See ?coord_polar for an example of making a pie
chart; I'm not clear what a clustered pie chart is.
2) Probably what you'd like to do here is to use R's strptime function
to convert your x-axis data to calendar dates. Then ggplot will
display things in the correct order. Alternatively, if you want to
keep those labels as factors, reorder them before plotting. Google
"reorder factor levels in r" for many examples of this.
Hope this is useful-
Ben
On Wed, Aug 8, 2012 at 10:37 AM, Alex <
anoop....@gmail.com> wrote:
> Hello All,
>
> I started using R a weeks ago and I am loving this tool. I have an issue
> while I am trying to plot a histogram. The code I am using to plot is given
> below and the graph generated is attached.
>
> Code
> Line 1 p5 <- ggplot(plot2, aes(x=Months)) +
> geom_histogram(aes(y=Measured)) + ylab("Measured Energy Usage, (kWh)")
> Line -2 p5 + opts(axis.text.x = theme_text(angle=90))
>
> Question
> 1) Can ggplot plot clustered bar chart and pie chart like in excel. if
> yes(which I am pretty sure would be) where can i find a detailed step by
> step instruction
> 2)Please see the attached graph and as you notice my months are in
> alphabetical order. How can i change that to chronological order.
>
> I do apologize if this questions are asked before. I did a research online
> before coming here to find a solution and was unsuccessful.
>
> Please guide. Any help is much appreciated.
>
> Regards,
> Alex
>
> --
> 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