We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The ggplot aesthetic specification doc gives a handy example of customizing linetypes, using the following format:
library(ggplot2) lty <- c("11", "18", "1f", "81", "88", "8f", "f1", "f8", "ff") linetypes <- data.frame( y = seq_along(lty), lty = lty ) ggplot(linetypes, aes(0, y)) + geom_segment(aes(xend = 5, yend = y, linetype = lty)) + scale_linetype_identity() + geom_text(aes(label = lty), hjust = 0, nudge_y = 0.2) + scale_x_continuous(NULL, breaks = NULL) + scale_y_reverse(NULL, breaks = NULL)
It could be handy to allow for something similar.
ggplot2's linetype support matches base R's linetype specification (h/t tidyverse folks for the pointer):
This syntax allows each character in a string to specify width of "on" and "off" line parts. For example,
It uses hexadecimal format, so allows for..
It seems like the R syntax could be supported directly. But I wonder if using an explicit separator might help clean things up a bit?
Something like:
This way, it's clear what separates each piece, and people are constrained to a single character per part.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The ggplot aesthetic specification doc gives a handy example of customizing linetypes, using the following format:
It could be handy to allow for something similar.
Background on ggplot2 syntax
ggplot2's linetype support matches base R's linetype specification (h/t tidyverse folks for the pointer):
This syntax allows each character in a string to specify width of "on" and "off" line parts. For example,
It uses hexadecimal format, so allows for..
Proposed syntax
It seems like the R syntax could be supported directly. But I wonder if using an explicit separator might help clean things up a bit?
Something like:
This way, it's clear what separates each piece, and people are constrained to a single character per part.
The text was updated successfully, but these errors were encountered: