Dear Dennis, Many thanks! Yes, ggplot2 could be used to illustrate a simple rose chart (category + one type variable) If I have a data frame like this: DF <- data.frame(month = factor(month.abb, levels = month.abb), freq1 = rpois(12, 80),freq2=rpois(12, 80),freq3=rpois(12, 80))
Do you have any idea how to plot the other 2 variables freq2 and freq3 by R? Nightingales Rose chart actually represent 3 variables here: blue is disease, red is wounds, and black is uncategorized. I checked plotrix; however, it seems it could not fulfill my purpose too. Actually, what I am looking for is how to render a heatmap (not a bar chart) in a polar coordinate system. Thanks again. Best, Henry On Fri, Nov 30, 2012 at 2:37 PM, Dennis Murphy <djmu...@gmail.com> wrote: > A simple version of what can be done in ggplot2 is illustrated in the > following toy example: > > DF <- data.frame(month = factor(month.abb, levels = month.abb), > freq = rpois(12, 80)) > ggplot(DF, aes(x = month, y = freq)) + > theme_bw() + > geom_bar(stat = "identity", fill = "pink2") + > coord_polar() > > Another option might be to use the plotrix package and to look into > the radial.plot function, but I don't know offhand if it will produce > rose diagrams without some effort. In ggplot2, a rose diagram is a bar > chart rendered in a polar coordinate system, consistent with > Wilkinson's grammar of graphics (whence the gg in ggplot2). > > Dennis > > On Fri, Nov 30, 2012 at 4:24 AM, Henry Smith <henry.helsi...@gmail.com> > wrote: > > Hello, Everyone. > > > > Does anyone know how to create a Nightingales Rose chart by using R? > > Hopefully, the graph could be displayed like this: > > http://mbostock.github.com/protovis/ex/crimea-rose.html > > Thanks a lot. > > > > Kind regards, > > Henry > > > > [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.