I want to make two histograms with two types data from the same population. One type of data has a broader range than the other and therefore that particular histogram has fewer bins with greater frequency than the other. Is there a general way to make the bin size of the two histograms the same?
n=377 #just a number
df <- data.frame(v.1=sample(2:10,n, replace =T),v.2=sample(30:130,n,replace = T))
H.1 <- hist(df$v.1)
H.2 <- hist(df$v.2,ylim=c(0,max(H.1$counts)))
str(H.1)
str(H.2)