[R-sig-Geo] unable to customize a plot produced from a shapefile

Alexandre Villers villers.alexandre at gmail.com
Thu Feb 9 21:39:24 CET 2012


Hi,

You should have a look at the documentation (e.g. manuals) available on 
graphics in R (on the CRAN website, hhttp://cran.r-project.org/) to 
learn how to set the parameters of a R graphic, and more specifically at 
the spplot function (from package sp) for spatial objects (the ASDAR 
book of Roger Bivand et al. is worth the look  
http://www.springer.com/public+health/book/978-0-387-78170-9 ).
There are also several web sites showing this: just google "plot spatial 
data r" and you should find what you are looking for.

HTH


Alex


Le 09/02/2012 22:19, satishr a écrit :
> Hi,
>    I read ESRI shapefile and related files using readOGR, and was able to
> plot successfully but am unable to customize the plot. The data is attached
> and corresponds to US climate divisions.
>    The below mentioned second command supposed to produce a plot of sub
> region of the USA but it's not. I tried using readShapePoly but no success.
> In addition, I found a lot of space on top of the picture and want to reduce
> it, but not sure how to do it. I request you to provide suggestions.
> Thanks,
> Satish
>
>
>> climagdiv = readOGR("US102ClimateDivisions", "US102ClimateDivisions")
> OGR data source with driver: ESRI Shapefile
> Source: "US102ClimateDivisions", layer: "US102ClimateDivisions"
> with 102 features and 5 fields
> Feature type: wkbPolygon with 2 dimensions
>> plot(climagdiv)
>> plot(climagdiv,ylim=c(20,40))
>
>> climagdiv = readShapePoly("US102ClimateDivisions.shp")
>> plot(climagdiv)
>> plot(climagdiv,ylim=c(20,40))
> Data:
> http://r-sig-geo.2731867.n2.nabble.com/file/n7270579/US102ClimateDivisions.zip
> US102ClimateDivisions.zip
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/unable-to-customize-a-plot-produced-from-a-shapefile-tp7270579p7270579.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list