-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Currently, the legend key is fixed to "a" because of the following code in legend-draw.r:
draw_key_text <- function(data, params, size) {
textGrob("a", 0.5, 0.5,....
What i need to do is, when my label is showing numbers only, i would like to have a number, e.g. "1" on the legend key instead of "a".
I tried to use the following but it does not look beautiful (in terms of code clarity):
draw_key_text <- function(data, params, size) {
textGrob(params$legend.key, 0.5, 0.5,....
}
geom_text <- function(....
key.legend = "a",..){
.... layer(....params = list(...key.legend = key.legend,...))
}
Is there any suggestion?
ajmoralesa and sjackman
Metadata
Metadata
Assignees
Labels
No labels