USGS-R / gsplot

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

start on #377 for lim<- #380

Closed jordansread closed 8 years ago

jordansread commented 8 years ago

set lims:

usrDef <- gsplot() %>% 
 points(x=1, y=2, side=c(3,2), legend.name="Points 1", cex=3, xlab='cat')
lim(usrDef,3)
[1] 1 1

lim(usrDef, 3)[1] <- 0
lim(usrDef,3)
[1] 0 1

lim(usrDef,3) <- c(0.25, NA)
lim(usrDef,3)
[1] 0.25 1.00

usrDef$side.3$usr.lim
[1]  TRUE FALSE
jordansread commented 8 years ago
usrDef <- gsplot() %>% 
    points(x=1, y=2, side=c(3,2), legend.name="Points 1", cex=3, xlab='cat')

lim(usrDef, side=3) <- c(0.2,NA)
usrDef <- points(usrDef, 5,2, side=c(3,2))
usrDef

image

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 76.951% when pulling 74c9928052818f24ab62f6bf1b4341f3936d9a49 on jread-usgs:set_xlim into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 76.951% when pulling 36aedf291803be9ab184b302cf1256a13f59e918 on jread-usgs:set_xlim into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.5%) to 77.347% when pulling dde4df6bb0d7ab5521572415261970121d325e71 on jread-usgs:set_xlim into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.

jordansread commented 8 years ago

now this supports lists:

myplot <- gsplot() %>%
   points(1:3, 2:4) %>%
   lines(1:5, 5:1)
lim(myplot) <- list('side.1'=c(0.5,4))

lim(myplot)
$side.1
[1] 0.5 4.0

$side.2
[1] 1 5
coveralls commented 8 years ago

Coverage Status

Coverage increased (+1.3%) to 78.114% when pulling 731c2407a9d289805dfd13dca85e7a5ebf5de2fc on jread-usgs:set_xlim into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.