-----Original Message-----
From: henry.helsinki at gmail.com
Sent: Fri, 30 Nov 2012 14:56:51 +0100
To: djmuser at gmail.com, r-help at r-project.org
Subject: Re: [R] Nightingale?s Rose chart-any suggestion?
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?
Nightingale?s 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 <djmuser at 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.helsinki at gmail.com>
wrote: