In ggplot2 how do you justify the legend text ?
In the example below the opts(legend.text = theme_text(size = 9,hjust=0)) changes the size of the text OK but it remains right justified.


> mydata=data.frame(RowID=c("A","B","C"),Name=c("long long long long long name","short name ","medium medium name"),Speed=c(100,140,120))
> mydata
 RowID                          Name Speed
1     A long long long long long name   100
2     B                   short name    140
3     C            medium medium name   120
> ggplot(mydata, aes(RowID,Speed))+ opts(legend.text = theme_text(size = 9,hjust=0)) + geom_bar() + xlab("Name") + aes(colour = Name) +aes(fill=Name)
>

Thank in advance
Paul


--
Dr. Paul J Sutcliffe


Casual Academic
Faculty of Engineering and IT, University of Technology, Sydney (UTS) email: psutc...@it.uts.edu.au
http://www-staff.it.uts.edu.au/~psutclif/
CRICOS Provider Code 00099F

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to