axes when plotting polys

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

axes when plotting polys

Stephane DRAY
Hello,
I  would like to plot polylist object without axes. if I use axes=F, it
does not work because the "..." are used as arguments of the function
polygon and not for the initial plot. I have rewrite my own function
(moving "..." argument from polygon to plot) and it works fine but I wonder
if there is a more "usual" way to do that.

Thanks.
St?phane DRAY
--------------------------------------------------------------------------------------------------

D?partement des Sciences Biologiques
Universit? de Montr?al, C.P. 6128, succursale centre-ville
Montr?al, Qu?bec H3C 3J7, Canada

Tel : 514 343 6111 poste 1233
E-mail : stephane.dray at umontreal.ca
--------------------------------------------------------------------------------------------------

Web                                          http://www.steph280.freesurf.fr/



Reply | Threaded
Open this post in threaded view
|

axes when plotting polys

Christophe Declercq
Hi, St?phane

I don't know if it is really 'usual' but I use something like (building on
the '?plotpolys' example in the 'maptools' package):

> library(maptools)
> try2 <- read.shape(system.file("shapes/columbus.shp",
package="maptools")[1])
> mappolys <- Map2poly(try2, as.character(try2$att.data$NEIGNO))
> plot(attr(mappolys, "maplim"), type="n", axes=FALSE, ann=FALSE, asp=1)
> plotpolys(mappolys, add=TRUE)

Hope it helps.

Christophe
--
Christophe DECLERCQ, MD
Observatoire R?gional de la Sant? Nord-Pas-de-Calais
13, rue Faidherbe 59046 LILLE Cedex FRANCE
Phone +33 3 20 15 49 24
Fax   +33 3 20 55 92 30
E-mail c.declercq at orsnpdc.org


> -----Message d'origine-----
> De : r-sig-geo-bounces at stat.math.ethz.ch
> [mailto:r-sig-geo-bounces at stat.math.ethz.ch]De la part de Stephane DRAY
> Envoy? : jeudi 5 f?vrier 2004 17:45
> ? : r-sig-geo at stat.math.ethz.ch
> Objet : [R-sig-Geo] axes when plotting polys
>
>
> Hello,
> I  would like to plot polylist object without axes. if I use axes=F, it
> does not work because the "..." are used as arguments of the function
> polygon and not for the initial plot. I have rewrite my own function
> (moving "..." argument from polygon to plot) and it works fine
> but I wonder
> if there is a more "usual" way to do that.
>
> Thanks.
> St?phane DRAY
> ------------------------------------------------------------------
> --------------------------------
>
> D?partement des Sciences Biologiques
> Universit? de Montr?al, C.P. 6128, succursale centre-ville
> Montr?al, Qu?bec H3C 3J7, Canada
>
> Tel : 514 343 6111 poste 1233
> E-mail : stephane.dray at umontreal.ca
> ------------------------------------------------------------------
> --------------------------------
>
> Web
> http://www.steph280.freesurf.fr/
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo
>



Reply | Threaded
Open this post in threaded view
|

axes when plotting polys

Roger Bivand
Administrator
St?phane, Christophe,

I've submitted maptools_0.3-8.tar.gz to CRAN, if it is accepted, it should
show up soon. I've moved the ... to the plot function setting the plotting
region, removed ... from the polygon() call, but added the specifically
polygon() arguments to the plot.polylist() method, which now does do
shading with density and angle properly - the clipping argument is also
passed to polygon(). Please let me know if this helps (once it shows up).

Roger

On Thu, 5 Feb 2004, Christophe Declercq wrote:

> Hi, St?phane
>
> I don't know if it is really 'usual' but I use something like (building on
> the '?plotpolys' example in the 'maptools' package):
>
> > library(maptools)
> > try2 <- read.shape(system.file("shapes/columbus.shp",
> package="maptools")[1])
> > mappolys <- Map2poly(try2, as.character(try2$att.data$NEIGNO))
> > plot(attr(mappolys, "maplim"), type="n", axes=FALSE, ann=FALSE, asp=1)
> > plotpolys(mappolys, add=TRUE)
>
> Hope it helps.
>
> Christophe
> --
> Christophe DECLERCQ, MD
> Observatoire R?gional de la Sant? Nord-Pas-de-Calais
> 13, rue Faidherbe 59046 LILLE Cedex FRANCE
> Phone +33 3 20 15 49 24
> Fax   +33 3 20 55 92 30
> E-mail c.declercq at orsnpdc.org
>
>
> > -----Message d'origine-----
> > De : r-sig-geo-bounces at stat.math.ethz.ch
> > [mailto:r-sig-geo-bounces at stat.math.ethz.ch]De la part de Stephane DRAY
> > Envoy? : jeudi 5 f?vrier 2004 17:45
> > ? : r-sig-geo at stat.math.ethz.ch
> > Objet : [R-sig-Geo] axes when plotting polys
> >
> >
> > Hello,
> > I  would like to plot polylist object without axes. if I use axes=F, it
> > does not work because the "..." are used as arguments of the function
> > polygon and not for the initial plot. I have rewrite my own function
> > (moving "..." argument from polygon to plot) and it works fine
> > but I wonder
> > if there is a more "usual" way to do that.
> >
> > Thanks.
> > St?phane DRAY
> > ------------------------------------------------------------------
> > --------------------------------
> >
> > D?partement des Sciences Biologiques
> > Universit? de Montr?al, C.P. 6128, succursale centre-ville
> > Montr?al, Qu?bec H3C 3J7, Canada
> >
> > Tel : 514 343 6111 poste 1233
> > E-mail : stephane.dray at umontreal.ca
> > ------------------------------------------------------------------
> > --------------------------------
> >
> > Web
> > http://www.steph280.freesurf.fr/
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at stat.math.ethz.ch
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo
>

--
Roger Bivand
Econonic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway, voice: +47-55959355, fax: +47-55959393; Roger.Bivand at nhh.no



Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway