make polygons transparent in plotKML
I never was able to get the alpha= argument to create transparent polygons in plotKML, but by carefully following the example in Bivand et al. (2008), of Scotland's borders (Chap 4.2.1, using OGR drivers in rgdal) I was able to achieve the desired effect. Thanks for problem-solving with me -Seth -----Original Message----- From: MacQueen, Don [mailto:macqueen1 at llnl.gov] Sent: Thursday, April 18, 2013 5:53 PM To: Seth Bigelow Subject: Re: [R-sig-Geo] make polygons transparent in plotKML Hmm. In that case I'd guess it's a package design and usage issue. But I'm not very familiar with the package, so it is indeed just a guess. ?kml shows an example with alpha=0.75, so maybe we're not intended to call plotKML directly, but rather through kml(). -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062
On 4/18/13 2:26 PM, "Seth Bigelow" <seth at swbigelow.net> wrote:
Thanks for your assistance, however, I don't seem to be achieving transparency no matter what alpha is... plotKML(MV[PSW,], colour_scale=rgb(0,0,0, alpha=0)) # Makes black fill --Seth -----Original Message----- From: MacQueen, Don [mailto:macqueen1 at llnl.gov] Sent: Thursday, April 18, 2013 3:21 PM To: Seth Bigelow Subject: Re: [R-sig-Geo] make polygons transparent in plotKML (actually, ?rgb would have been a better pointer) -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/18/13 9:03 AM, "Seth Bigelow" <seth at swbigelow.net> wrote:
Greetings: Could anyone advise me how to make transparent polygons in plotKML? I am overlaying polygons in a SpatialPolygonsDataFrame object into Google Earth - Seems I can make the polygons any color (e.g., yellow - see example) except transparent plotKML(mySPDF, colour_scale ="#FFFF00") Appreciately, Seth Bigelow [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo