Is this what you want?
ggplot(d, aes(counts, fill = name)) +
geom_bar(stat = "bin", position = "dodge")
Note: You probably should play around with the "bin" width.
On Thu, 17 Sep 2020 at 18:05, Ana Marija
wrote:
> Hello,
>
> I am trying to overlay two histograms with this:
>
> p <- ggplo
HI Jim,
fantastic solution!
Thank you so much!!!
Ana
On Thu, Sep 17, 2020 at 6:01 PM Jim Lemon wrote:
>
> Hi Ana,
> Sorry it's not in ggplot, but it may help:
>
> d<-read.table(text="CHR counts name
> 1 193554 old
> 2 220816 old
> 3 174350 old
> 4 163112 old
> 5 168125 old
> 6
On 2020-09-17 17:01 -0500, Ana Marija wrote:
> Hello,
>
> I am trying to overlay two histograms with this:
>
> p <- ggplot(d, aes(CHR, counts, fill = name)) + geom_bar(position = "dodge")
> p
>
> but I am getting this error:
> Error: stat_count() can only have an x or y aesthetic.
> Run `rlang::
Hi Ana,
Sorry it's not in ggplot, but it may help:
d<-read.table(text="CHR counts name
1 193554 old
2 220816 old
3 174350 old
4 163112 old
5 168125 old
6 182366 old
7 143023 old
8 147410 old
9 122112 old
10 138394 old
11 130069 old
12 124850 old
13 104119 old
14
Hello,
I am trying to overlay two histograms with this:
p <- ggplot(d, aes(CHR, counts, fill = name)) + geom_bar(position = "dodge")
p
but I am getting this error:
Error: stat_count() can only have an x or y aesthetic.
Run `rlang::last_error()` to see where the error occurred.
my data is this:
5 matches
Mail list logo