Hi !
I'm trying to realise a graph with ggplot2 about bats activity
Bats live the night so my data are during the night. I would like that those are in the middle of my graph and not on the side.
this is my code :
spsol<-ggplot(mydatasol, aes(Date_nuit,Temps))+geom_point(size=0.5) +
scale_y_datetime(labels=function(x) format (x,"%H:%M", tz="UTC"),
date_breaks = '2 hour',expand = c(0,0))+
labs(title="Activité des chauves-souris durant l'année 2020 à Mabompré Nord",
x ="Date", y = "Temps (Heures)")+
scale_x_datetime(date_breaks = "1 month", labels = date_format("%d %b"))
spsol + geom_density_2d_filled(contour_var = "ndensity")+
geom_line(data= H_lev_couch, aes(x= Date, y=Lever du soleil
),color="red")+
geom_line(data= H_lev_couch, aes(x= Date, y=Coucher du soleil
),color="orange")+
theme_bw()
The graph that I want begin around 11AM , pass through midnight and end the next day at 11AM
and this is what I have
Thank you for your answer !