I have a df that looks like:
df = data.frame(behavior = rep("proximity", 20),
value = rep(-0.04280145, 20))
All the numeric values are the same and I want to make a very simple historgram. However, when I plot it, I get something like
hist(df$value)
With {ggplot2} I tried:
library(ggplot2)
ggplot(df) +
geom_histogram(aes(x = value)
I am not sure why the bin spans so many values.
I was expecting on bar representative of -0.042 with a count of 20. I have tried adjusting bins, and binwidth, but I am at a loss.

Is this what you need? The secret is converting your value to a factor.
Created on 2024-02-11 with reprex v2.0.2