Patrick, I can see this is confusing.
Besides methods(plot), try after library(sp) a
showMethods(plot)
to get an overview of the S4-style plot methods; methods(plot) only shows the S3-style plot methods. Then,
class?SpatialPolygons
gives methods available for this class, among which plot, and the html listing of plot methods has entries like
plot.SpatialPolygons,missing-method
that points to the same help page (which is rather brief).
getMethod("plot", c("SpatialPolygons", "missing"))
shows you the arguments this method takes, and shows that it actually calls plot.SpatialPolygons. This method is not exported from sp, so to view it you need to access it as
sp:::plot.SpatialPolygons
the other sp functions it calls can also be accessed by preceding them with sp:::
I agree that more elaborate documentation along with examples would be useful.
Hope this helps,
-- Edzer Patrick Giraudoux wrote:Received on Tue Jan 02 03:20:00 2007
> Dear listers,
>
> I am working since a while with the sp package and still wonder how the
> plot methods are managed with sp spatial objects. For instance,
> SpatialPolygonsDataFrame objects have obviously a plot method. However
> it cannot be found in the list provided by methods(plot) . Furthermore
> ?plot.SpatialPolygonsDataFrame, nor ?plot.SpatialPolygons, etc.. provide
> a help, though the lattice function spplot is adequately documented.
>
> On the other hand, plot(myobject, border="grey"), with myobject a
> SpatialPolygonsDataframe is well interpreted and recalls the syntax of
> plot.polylist of matools (though myobject is far from being a polylist...).
>
> Can anybody (especially the package's authors...) comment on this? Where
> a help with the list of the plot function arguments can be found?
>
> Thanks for any hint,
>
> Patrick
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
______________________________________________ R-help@stat.math.ethz.ch 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.
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.1.8, at Mon 01 Jan 2007 - 16:30:27 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.