[R] The "inset" argument in legend().

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Sat Oct 30 02:19:29 CEST 2021

I cannot get the "inset" argument in legend() to produce the results
that I want.  It seems to me that when the legend position argument is
set to "bottom" then only the second (y-component) entry of "inset"
has any effect, and when the position argument is "left" then only
the first (x-component)  entry of "inset" has any effect.

I have attached a file "legDemo.txt" which can be sourced to
demonstrate the behaviour that I am encountering.

I thought that maybe if one uses "inset" then one should not specify
the legend position, but that causes an error to be thrown.

I want to have a near the bottom of the plot and to adjust its
position, in the horizontal direction by means of "inset", but nothing
that I try has the desired effect.

Am I misunderstanding something?  Or is there perhaps a bug in


Rolf Turner

Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: legDemo.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20211030/9436a173/attachment.txt>

More information about the R-help mailing list