USGS-R / gsplot

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

adding "where" param #378

Closed jordansread closed 8 years ago

jordansread commented 8 years ago

lets us do first or last (default is "last")

part of

207

jordansread commented 8 years ago

Note that this is not reflected in the legend ordering right now. I am not very familiar with that. So if we like this, we should create an issue to also include first or last in the way we append the legend contents for auto legends

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 77.001% when pulling c0a924b06943fc44f8d0b19c8e453952d9dc6b38 on jread-usgs:master into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 77.001% when pulling c0a924b06943fc44f8d0b19c8e453952d9dc6b38 on jread-usgs:master into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.

jordansread commented 8 years ago

added the legend re-ordering

gs = gsplot() %>% points(1:2,2:3, cex=c(2.5,1), pch=0, lwd=3, legend.name=c('points.1','points.2'), bg='cyan', xlim=c(0.5, 2.5), ylim=c(1.5,3.5)) %>% 
    points(1,2, pch=17, col='green', cex=4, where='first', legend.name='points.3', bg='dodgerblue') %>% legend()
gs

image

I tried a bunch of different combos of things, and it seems things are operating as expected.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.9%) to 77.717% when pulling 9eb474c2b431af05f6e8ac2bcdad5b8becfe558c on jread-usgs:master into 539e9d263d43f73e87be1d1b49d9fb99e7d46fa3 on USGS-R:master.