[R] Legend position in ggplot

Felipe Carrillo m@z@t|@nmex|co @end|ng |rom y@hoo@com
Thu Jun 17 21:05:49 CEST 2021


Like this? theme(legend.position= 'top'


    On Thursday, June 17, 2021, 10:52:04 AM PDT, peri He <statistics84 using hotmail.com> wrote:  
 
 Dear Friends,

I would like to see my legend outside of a ggplot (at the top).

This code is showing the legend inside of a plot:
theme(legend.position=c(0.15,0.97))

But when I changed it to : theme(legend.position=c(-0.15,1.5)) , the legend disappears.

I would appreciate it if you share your ideas.

Regards,

Peri



    [[alternative HTML version deleted]]

______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.
  
	[[alternative HTML version deleted]]



More information about the R-help mailing list