[R] Placement of legend in base plot()

Helmut Schütz he|mut@@chuetz @end|ng |rom beb@c@@t
Tue May 31 16:34:54 CEST 2022

Dear Timothy,

Ebert,Timothy Aaron wrote on 2022-05-31 15:42:
> I will suggest that if the bty='n' approach works that is a good solution.

Sometimes though not always.

> If you have 50 graphs and they all have the same legend, then put the legend in a common area outside the graphs or in graph 1 (and a comment in the legend or a footnote.)

I have 5 graphs with up to 200 data points each and different legends.

> I would be fine with the legend outside the graph, if that was necessary.

Good idea.

> If data points are critical for some users then include the raw data as an appendix or electronic attachment.

The users have the data. This is just for an EDA.

> If I had to wade through a large number of graphs I think I would get more annoyed at having the legend appear in odd places within the graph. It might highlight skills in R to make the legend dynamically placed (change size and placement to fit the largest open area within a graph), but it would not improve communication in my opinion.

Good point!


Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
Neubaugasse 36/11
1070 Vienna, Austria
T +43 1 2311746
M +43 699 10792458
E helmut.schuetz using bebac.at <mailto:helmut.schuetz using bebac.at>

More information about the R-help mailing list