Plotei um gráfico do tipo histograma, utilizando o seguinte código:
hist(dados1$Prec, breaks=40 , col=rgb(0.2,0.8,0.5,0.5) , border=F , main="" , xlab="Precipitação (mm)", xlim=c(0,140), ylim = c(0,10000))
Preciso colocar o histograma em escala logaritmica para que as outras classes (barras) possam aparecer também, devido a grande quantidade de valores que possuo. Como poderia fazer isso?
Segue a amostra dos meus dados:
dput(head(dados1$Prec,500))
c(8.9, 32.7, 0.3, 3.9, 8.8, 29.2, 2.5, 0.6, 27.7, 11.2, 9.8,
0, 6.6, 0, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 6.2, 0, 0, 19.4, 15.1,
0.9, 16.4, 0, 0, 0, 0, 0, 0, 0, 0.1, 10.1, 0.1, 0.2, 1.3, 2.4,
2.6, 0, 0, 4.8, 0, 0.6, 7.1, 4.1, 0, 5, 0, 2.3, 6.3, 9.1, 25.7,
8.3, 24, 1.2, 0, 0, 0, 0, 19.8, 5.5, 0, 0, 0, 0.2, 0, 2.8, 6.9,
51.6, 41.6, 58.9, 0.2, 0, 22.1, 0, 0, 2.3, 0, 2.2, 10.6, 0, 0,
0, 0, 0, 0.3, 0, 4, 0, 0.2, 0, 13.7, 0.7, 44.6, 0, 0, 0, 0, 20.2,
0, 1.3, 0, 0.7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31.5,
0, 6.8, 0, 0, 6.8, 11.6, 5.4, 1.8, 0, 0, 0.9, 0, 7.6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0.5, 0.1, 3.1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 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