how to change strip.text labels in ggplot with facet and margin=TRUE

Posted by Andreas on Stack Overflow See other posts from Stack Overflow or by Andreas
Published on 2010-05-23T18:56:47Z Indexed on 2010/05/23 19:00 UTC
Read the original article Hit count: 389

Filed under:
|
|
|
|

I have looked here but still can't figure it out. How do I change the strip.text.x labels in a ggplot with faceting? Specifically I am using facet_grid with margins. The strip.text label for the margin is "(all)" - but since I am in a non-english speaking country I would rather write "Total" or something similar in my native tongue.

opts(stip.text.x=c(levels(facetvariabel,"Total")) does not work.

Any ideas?

Example (not really the best dataset for this - but I guess it will work)

ggplot(cars, aes(x=dist))+geom_bar()+facet_grid(.~speed, margin=T)

© Stack Overflow or respective owner

Related posts about r

    Related posts about label