On Jan 25, 2008 2:04 PM, Domenico Vistocco <[EMAIL PROTECTED]> wrote:
> You could use ggplot2:
>
> library(ggplot2)
> x=rnorm(100)
> y=rnorm(100)
> df=melt(data.frame(x,y))
> #for "vertical" histogram
> ggplot(data=df,aes(x=value))+geom_histogram()+facet_grid(.~variable)
> #for "horizontal" histogr
You could use ggplot2:
library(ggplot2)
x=rnorm(100)
y=rnorm(100)
df=melt(data.frame(x,y))
#for "vertical" histogram
ggplot(data=df,aes(x=value))+geom_histogram()+facet_grid(.~variable)
#for "horizontal" histogram
ggplot(data=df,aes(x=value))+geom_histogram()+facet_grid(.~variable) +
coord_flip
You might look at the method histbackback (back-to-back histograms) in
package Hmisc. At the time I looked at this package about a year ago,
I could not get it working on my Mac, so I don't actually know what
the results look like, but I have created them before in XLispStat and
found them
Juan Pablo Fededa wrote:
> Dear Contributors:
>
> I have two vectors x and z, and I want to display the histograms of both
> vectors in the same graph, x in red bars, z in blue bars.
> If you have any clue on how to do that, I will be very glad to hear it!!
> Thanks in advance again,
>
Hi Jua
Duncan Murdoch wrote:
> On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote:
>
>> Dear Contributors:
>>
>> I have two vectors x and z, and I want to display the histograms of both
>> vectors in the same graph, x in red bars, z in blue bars.
>> If you have any clue on how to do that, I will be very gla
On 1/24/2008 9:43 AM, Juan Pablo Fededa wrote:
> Dear Contributors:
>
> I have two vectors x and z, and I want to display the histograms of both
> vectors in the same graph, x in red bars, z in blue bars.
> If you have any clue on how to do that, I will be very glad to hear it!!
It's hard to
delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Namens Juan Pablo Fededa
Verzonden: donderdag 24 januari 2008 15:44
Aan: r-help
Onderwerp: [R] two histograms in the same graph
Dear Contributor
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear it!!
Thanks in advance again,
Juan Pablo Fededa
[[alternative HTML
8 matches
Mail list logo