[R-sig-Geo] linewidth of polygon

Roger Bivand Roger.Bivand at nhh.no
Fri Sep 9 13:26:09 CEST 2005


On Fri, 9 Sep 2005, Michael Sumner wrote:

> Hello,
> 
> >My at hoc solution is to edit output eps file with emacs, and change
> >the value of linewidth directory.  It is, however, troublesome job.
> >
> >  
> >
> You might try this (here lwd is being passed to lower level plot functions)
> 
> pl <- read.shape("pl.shp")      
> 
> plot(pl, lwd = 0.5)
> 
> However ?par reveals
> ...
>      'lwd' The line width, a _positive_ number, defaulting to '1'.  The
>           interpretation is device-specific, and some devices do not
>           implement line widths less than one.
> 
> and I certainly don't see a difference with either postscript() or pdf() 
> - Windows XP. 

No, I believe 1 is the lowest you get. I think that the visual effect can 
be varied by increasing the plot area or other fiddling around when 
opening a device. As far as I know, plot.Map() does not successfully pass 
lwd= either, I'll add the ... to plot.Map calls to polygon(), which will 
permit thicker borders, will be in 0.5-2.

> 
> I don't know enough about the various devices - eps() etc. -  to know if 
> this is likely to be helpful.
> 
> >It is very nice if we can assign the value of linewidth when we use
> >plot.Map.  Or even option to remove boundary itself.
> >  
> >
> 
> This will plot no boundary at all ("ol" is an argument of plot.Map):
> 
> plot(pl, ol = NA)
> 

Or plot(pl, ol = "transparent").

Both lwd= and setting border= to transprent do work in the plot methods 
for classes in the sp package, and maptools from 0.5-1 depends on sp. 
Getting thinner than 1 is open, though.

> I hope that helps.
> 
> Cheers, Mike.
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list