[R] label_wrap_gen question

vd3000 vd3000 at yahoo.co.uk
Tue Aug 7 06:07:23 CEST 2012


Hi, all

I am trying to use the label_wrap_gen function in this website.
https://github.com/hadley/ggplot2/wiki/labeller
I tried to make a long name like this

Light and heavy good vehicles (diesel) -\nGVX

f2 = facet_grid(vehicle ~ ., labeller=label_wrap_gen(width=15))

eventually, I got something like this in my label...
*Light and heavy 
good vehicles 
(diesel) - GVX*
I suppose the "-n" could break GVX to the next row but it failed...
Is it a bug? or it has been overpowered by "width=15"?? so "-n" could not
function well?

Eventually I tried f2 = facet_grid(vehicle ~.)

The "-n" did work and I got 
*Light and heavy  good vehicles (diesel) -
GVX*

But it also failed because I could not show all the label properly...

Anyone has idea about this?
It is freaking me out~ I am sorry I am stupid on R
Thanks in advance.

VD






--
View this message in context: http://r.789695.n4.nabble.com/label-wrap-gen-question-tp4639364.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list