Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

barwidth in histograms is not the same

$
0
0

My data looks like this. If I plot a histogram of pH.Value for a specific Uniprot.Recommended.Name on a grid based on Space.Group with code like this

library(tidyverse)
ggplot(data = filter(massaged, Uniprot.Recommended.Name == "Myoglobin")) + geom_bar(mapping = aes(x = pH.Value)) + facet_grid(. ~ Space.Group)

I get a plot like this enter image description here.

Why I have very thin bars (lines I would say) in the second Space.Group (P 21 21 21) and decent-width bars in the fourth Space.Group (P 43 21 2)? Can I have an equal bar width?

Thanks.

Ps. I did head -n 1001 data > dummy.tsv to my data. If you want the whole dataset just ask.


Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>