USGS-R / gsplot

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

Theme #425

Closed ldecicco-USGS closed 7 years ago

ldecicco-USGS commented 7 years ago

Hmm...after building my readme and vignette, I see there's a par thing still going on.

jiwalker-usgs commented 7 years ago

I'd prefer the code that builds the theme objects in source rather than just in the sysdata.rda (more transparent and maintainable).

ldecicco-USGS commented 7 years ago

Hmm...so then would you not want the thing that is assigned to the object? I'm confused.

I want the user to also be able to make a theme easily in their workspace..so....I'll have to think how that could all be done the way you are asking. As it stands, you can use a theme that's packed up in the package, or make one yourself:

theme.packers <- gsplot() %>%
  bgCol(col="#203731") %>%
  grid(col = "gold", lty = 1, lwd=3) %>%
  par(tcl=-0.2, cex=0.75) %>%
  axis(side = c(1,2), lwd = 0, lwd.ticks = 1)

save(theme.packers, "packers.RData") # To use it again someday

gsplot(theme=theme.packers) %>%
  points(1:4, 1:4, col="brown", pch=20, cex=3)

image

jiwalker-usgs commented 7 years ago

Yeah, that way would work, I'm just thinking that the themes that are built into the package should be defined in source.

ldecicco-USGS commented 7 years ago

I'm still confused, but I'm sure you can explain it to me in person.

ldecicco-USGS commented 7 years ago

(i like the packer theme....that might have to go in there)

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 82.559% when pulling a7c150738bc8803dce30cccee87c926d164fea2a on ldecicco-USGS:master into 68f294b930c9bd73b4c9a310203ef22247aefffe on USGS-R:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 82.559% when pulling a7c150738bc8803dce30cccee87c926d164fea2a on ldecicco-USGS:master into 68f294b930c9bd73b4c9a310203ef22247aefffe on USGS-R:master.

lindsayplatt commented 7 years ago

Partially fixing #425. Still working on testing config to theme override behaviors.

User config has priority over theme config. Only change theme config settings if user-config has them.