2
I would like to create a gray hatched area, just like the one in the image below.
I plotted the curve, with the data as follows:
dados <- c(149.3355, 140.3779, 145.7254, 149.8931, 139.6168, 149.1934, 129.6147, 134.7523, 167.8030, 171.7407, 157.5422, 160.2664, 155.4553, 142.5989, 134.9844, 148.5172, 163.1447, 131.0138, 130.2423, 167.2239, 149.4015, 145.6802, 160.3472, 121.1775, 136.7295, 162.2381, 150.7192, 117.8144, 137.3630, 158.6373, 168.0833, 133.9263, 150.9102, 149.4811, 167.4367, 178.0970, 138.4903, 148.6764, 181.0990, 167.3345, 147.0679, 156.1410, 148.8734, 140.9484, 147.6408, 134.5726, 184.6812, 134.6648, 146.8130, 167.4161)
x <- seq(min(dados), max(dados), length=1000)
curve(dnorm(x, mean=mean(dados), sd=sd(dados)), col="red", lwd=2, yaxt="n", xlim=c(100,200), main = "Tempo de Transmissão via Satélite", xlab="Tempo", ylab = "Freq")
The chart above, which I created, is this:
The range of values for the hatched area on the x-axis is P(125 < x < 150) = 45.22%. I know this area should be obtained with the function Polygon(), but I am not knowing how to complete the arguments.
Thank you in advance.
It is a hatched area or a painted area as in the figure?
– Marcus Nunes
can even be painted. As it is easier.
– Marcos Trotta