USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

A separate method to allow calls to bypass the function collection etc things #446

Open jordansread opened 7 years ago

jordansread commented 7 years ago

I often run into a situation where I want to

gs <- gsplot() %>%
   lines(x=c(1,2), y=c(4,2),
       callouts=list(labels=c(NA, "data"), col="blue")) %>% 
    rect(xleft=1, xright=17, ybottom=1, ytop=27, 
         density=10, angle=130, col='darkblue')
gs

and have the rect impact the limits and other things, and times when I want it to not:

gs <- gsplot() %>%
   lines(x=c(1,2), y=c(4,2), 
       callouts=list(labels=c(NA, "data"), col="blue")) %>% 
    rect_(xleft=1, xright=17, ybottom=1, ytop=27, 
         density=10, angle=130, col='darkblue')
gs

a couple things here: 1) we might need to be able to specify when a call should be ignored in the function call 2) it is faster to skip the function collection things and the calculation of limits for a call that you want ignored anyways.