Re: [R] plot single part of the country using gadm map

2010-09-27 Thread Paul Murrell

Hi

carolina plescia wrote:

Dear all,

in GADM map there are three levels (nation, province and precinct) for each
country of the world but for all of them you are never able to plot only one
part of a chosen country.


The Spatial object you get when you read in the shapefile has 
convenient subsetting methods defined.  For example ...


library(maptools)

italy - readShapeSpatial(ITA_adm1)
plot(italy)

liguria - italy[italy$NAME_1 == Liguria, ]
plot(liguria)

Is that what you are after?

Paul


To be sure, I am trying to plot only one region of “Italy” and colour the
different precincts in it. So far I am able to colour only the part of my
interest but the programme still plot the whole country.

Is that a way to have only a chosen part of the country (ie. region or
state) with all the specific subunits in it?

I have tried also to plot and then zoom but the “zoom” function seems to
work only with “plot” while gadm map uses ”spplot”.

Anyone knows if the zoom command works also with spplot?

Any suggestions?

Thank you very much.
Carolina



--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] plot single part of the country using gadm map

2010-09-26 Thread carolina plescia
Dear all,

in GADM map there are three levels (nation, province and precinct) for each
country of the world but for all of them you are never able to plot only one
part of a chosen country.

To be sure, I am trying to plot only one region of “Italy” and colour the
different precincts in it. So far I am able to colour only the part of my
interest but the programme still plot the whole country.

Is that a way to have only a chosen part of the country (ie. region or
state) with all the specific subunits in it?

I have tried also to plot and then zoom but the “zoom” function seems to
work only with “plot” while gadm map uses ”spplot”.

Anyone knows if the zoom command works also with spplot?

Any suggestions?

Thank you very much.
Carolina

-- 
Carolina Plescia

PhD Candidate and IRCHSS Scholar
Department of Political Science
Institute for International Integration Studies
Trinity College Dublin
plesc...@tcd.ie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.