USGS-R / gsplot

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

config function only sets args in "vanialla" graphics-like functions #417

Closed ldecicco-USGS closed 7 years ago

ldecicco-USGS commented 7 years ago

I think the config file (both via loadConfig and using a temporary config file are only changing par. So if it's a non-par argument, it's ignored (with a warning at least). For example....label=FALSE. label is an argument of axis, but not a par argument.

loadConfig(system.file("extdata", "lineScatter.yaml", package = "gsplot"))
df <- data.frame(x = 1:10, y=1:10, z = seq(2,20,2))

gspDef <- gsplot() %>%
                  points(df$x, df$y, legend.name = "points") %>%
                  bgCol() %>%
                  legend()

gspDef

rplot

The lineScatter.yaml has the bgCol set to lightgrey, and the title of the legend should be "EXPLANATION".

My understanding was that we wanted this file (or gsplot options) to be the default arguments for any function (not just par). So, either it's a bug, or I understand the config file wrong. In which case, we should re-jigger the documentation and yaml files to only have par arguments.

ldecicco-USGS commented 7 years ago

So, legend, error_bars, and callouts I think are all missing this functionality.

ldecicco-USGS commented 7 years ago

To do: