-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create templates (or similar) for gsplot plotting defaults #5
Comments
Look at ggplot2 themes: Example: We might want to (way down the road) create a function to read a ggplot2 theme, and convert it to gsplot config. |
@ldecicco-USGS is this referring to the guidelines set by the USGS plotting guidelines you sent me earlier this week? |
@ldecicco-USGS is this supposed to be a yaml? |
yeah, this is an old Issue, but once @jiwalker-usgs makes the yaml, let's start populating it with things that make sense....ie stuff in the plotting guidelines. If the yaml isn't ready (or won't be soon), the same parameters can be added to the |
Ok, makes sense. Could you send the guidelines again? It was in my shared folder, but now it's not |
I have the yaml working, but the way it deals with options is a problem right now. I'll try to wrap that up and make a PR. |
thanks |
There are some defaults that are specified in the function call and in the default.yaml file. Do we want to be consistent with where default features are defined? Example: callouts
|
Guidelines to add to yaml:
legend:
title: "EXPLANATION"
location: "bottomleft" Guidelines that should be added elsewhere:
x <- c(1000, 2000, 3000)
y <- c(2000, 1000, 2000)
labs <- prettyNum(x, big.mark=",", scientific=FALSE)
gs <- gsplot() %>%
points(x, y) %>%
axis(side=1, at=x, labels=labs)
gs
x <- c(1000, 2000, 3000)
y <- c(2000, 1000, 2000)
gs <- gsplot(ps=10) %>%
points(x, y, legend.name="Some Points") %>%
legend() %>%
title(main="GRAPH")
gs
|
My suggestion for the next sprint is to have someone re-create the (appropriate for https://github.com/USGS-R/smwrGraphs/blob/master/inst/doc/LineScatter.pdf For example, the first graph in the first link: set.seed(2576)
X <- runif(33)
Y <- runif(33)
Z <- rep(c("A","B","C"),11)
X12 <- X[1:12]
Z12 <- LETTERS[1:12]
library(gsplot)
gsplot() %>%
points(X, Y, col="darkblue")
So, just futzing with config.yaml, can we get: |
|
@wdwatkins maybe break this out into multiple issues (for each template type) |
We need to be able to get every graph in each of the pdfs above? |
I think the main point is just that it not be extremely painful to create those w/ |
Things like default tick lengths, colors, line weights, font sizes, font types, legend placement, etc.
yaml within the package?
See
ggplot2
themes for inspiration http://docs.ggplot2.org/current/theme.htmlThe text was updated successfully, but these errors were encountered: