I'm trying to obtain 2 plots on the same chart, with y dual axis, one with linear scale and the other one with logarithmic scale. (I know, it's not good practice in general...) First data range from 0 to 2500, these are the ones I want to see as linear. Second data range from 0 to 50.000, these ones should be represented with logarithmic scale. The plot looks ok but I'm not actually sure as I don't manage to handle properly the ticks of the second axis. I would like to see on my second axis an easy logarithmic scale like (100,1000, 10000), how could i do that? I tried to play with the breaks but no success so far.
Test<-ggplot()+ geom_area( aes(x=DateReport1,y=TotalCases_log10*1000), fill=alpha("grey",0.7), data=CountryData)+ geom_bar(stat="identity", aes(x=DateReport1,y=NewCases), fill="#D86422",size=0.6, data=CountryData)+ scale_y_continuous(sec.axis = sec_axis(~ log10(.)*1000))