[R] continuous coloring of a polygon

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sun Aug 17 11:29:25 CEST 2008

2008/8/17 Roger Leenders <r.t.a.j.leenders at rug.nl>:
> WinXP, R2.7.1
> Thanks so much to all who have reponded to my inquery. The solutions are
> most helpful.
> There is only one final thing that I can't seem to get right.
> All of the proposed solutions yield a figure that is not quite round, but is
> wider than its height. This can be resolved by manually resizing the window
> in which it is plotted, but that becomes cumbersome when many of these
> figures need to be generated. Is there a way to enforce the figure to be
> perfectly round?
> I have tried plotting directly to a windows device (using for example the
> code below) or to a pdf-device in which I specifically specify the square
> size of the plot, but the situation remains in which the figure is wider
> than it is high. Does anyone know how to solve this final piece of the
> puzzle?

 add 'asp=1' to your plot() function to specify a 1:1 aspect ratio.
Should do the trick.


More information about the R-help mailing list