If you need to stick with the specific mean
s and sd
s used but exclude any negative values you can filter the datasets e.g. ROS_SPITFIRE[ROS_SPITFIRE$length>0,]
or do limits on the chart e.g. xlim(0,12)
.
If you can amend the distribution you can pick distributions or values that do not result in negative values. @Dave and @jbaum provide guidance like using sample(seq(.1, 1, by = .1), 100, replace = T)
or evaluating other distribution options for going down this route.
You can also cut out some steps by going straight to charting and provide a limit:
ggplot(ROS_SPITFIRE, aes(length, y = ..density..,fill="spitfire")) +
geom_histogram(alpha = 0.5, position = 'identity')+
geom_histogram(data=ROS_FARSITE, aes(fill="farsite"),
alpha = 0.5, position = 'identity')+
xlim(0,12)