USGS-R / gsplot

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

Custom configs bleed over if default config #391

Closed ldecicco-USGS closed 8 years ago

ldecicco-USGS commented 8 years ago

If a config file has something that is not defined in default: superFat.yaml:

lwd: 3
lines: 
  lwd: 3
abline:
  col: "grey"
  lty: 1
  lwd: 1

Then:

df <- data.frame(x = 1:10, y=1:10, z = seq(2,20,2))
loadConfig("D:/LADData/RCode/gsplot/superFat.yaml")
gsp <- gsplot() %>%
  lines(df$x, df$y, col="red", legend.name = "points") %>%
  lines(df$x, df$z, legend.name = "lines") %>%
  legend()
gsp

Makes this: 2016-07-08_14-58-13

Then do:

loadConfig()
gsp <- gsplot() %>%
  lines(df$x, df$y, col="red", legend.name = "points") %>%
  lines(df$x, df$z, legend.name = "lines") %>%
  legend()
gsp

and you still get: 2016-07-08_15-00-21

ldecicco-USGS commented 8 years ago

So, we need to make some sort of "clear all" function