Legende in 5 er Schritten
Verfasst: Mo Nov 09, 2020 10:12 am
Hallo, habe einen Graphen, wo die Y-Achse in 10 er Schritten dargestellt ist, ich diese aber in 5 er Schritten von -20 bis 20 darstellen möchte. Leider haben weder Bücher, Videos noch Beiträge mir weitergeholfen. Ich denke es ist ganz einfach. Vielen Dank schon mal im Voraus.
Lg Phil
Auzug aus meinem Script:

Lg Phil
Auzug aus meinem Script:
Code: Alles auswählen
### plot daily values
r <- as.POSIXct(round(range(daily.val$days), "days"))
plot(t_dmean ~ days, data=daily.val,
type='b', pch=4,col='blue', lwd=1.5,cex=0.65, ylim=c(-20,20),
main="Wetterstation1 2014-2015",ylab='Mean monthly air temperature [°C]',xlab='',xaxt='n')
axis.POSIXct(1,daily.val$days,at = seq(r[1], r[2], by = "months"), # possibilities: day, days, weeks, months, quarter
format="%d/%m/%Y",las=2,cex.axis=0.95)
#axis.POSIXct(1,daily.val$days,at = c('2019-11-13','2019-12-01'), # possibilities: day, days, weeks, months, quarter
axis.POSIXct(1,daily.val$days,at = c('2014-10-01','2015-07-31'), # possibilities: day, days, weeks, months, quarter
format="%d/%m/%Y",las=2,cex.axis=0.95)
# SD borders
lines(t.p.sd~daily.val$days,col='red',lty=1,lwd=0.3)
lines(t.m.sd~daily.val$days,col='red',lty=1,lwd=0.3)
# SD polygon
polygon(
x = c(daily.val$days, rev(daily.val$days)),
y = c(t.p.sd, rev(t.m.sd)),
col = "#cc000033",
border=NA
)