Dear all, I have been playing with rasters for a while but when it comes to plotting I always encounter some difficulties that I have not resolved yet...
* I have a raster r2 > e class : Extent xmin : -2356170 xmax : -1624740 ymin : 1218210 ymax : 2538240 > r2 = raster (e,ncol=10,nrow=5) > r2[]= runif (50,0,100) > r2 class : RasterLayer dimensions : 5, 10, 50 (nrow, ncol, ncell) resolution : 73143, 264006 (x, y) extent : -2356170, -1624740, 1218210, 2538240 (xmin, xmax, ymin, ymax) coord. ref. : NA data source : in memory names : layer values : 3.23514, 98.28136 (min, max) * Since I am going to plot several rasters (of the same extent but different values) I want my colors and legend to go from 0 to 100 plot (r2, breaks=seq(0,100,1), col=pal_temp(length(my.at)) ,ext=extent(r) , axis.args=list(at=seq(0,100,50), labels=seq(0, 100,50), cex.axis=0.6), legend.args=list(text='MYUNITSHERE', side=4, font=2, line=2.5, cex=0.8)) ### PROBLEM? 1. Why does the extent on the x-axis does not restrict to the xmin and xmax of the extent? How can I change that ? I have gone thorugh serveral posts but could not find any solution within plot::raster 2. Worse case scenario, I would remove the bounding box of the map. I tried with axes=F and frame.plot=F put it just removes the objects....how can I do that? THANKS A LOT, Pep ################### SESSION INFO > sessionInfo() R version 2.15.2 (2012-10-26) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] fields_6.7 spam_0.29-2 RColorBrewer_1.0-5 rgdal_0.7-22 raster_2.0-31 sp_0.9-99 ggplot2_0.9.2.1 loaded via a namespace (and not attached): [1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.2 gtable_0.1.1 labeling_0.1 lattice_0.20-10 MASS_7.3-22 memoise_0.1 [10] munsell_0.3 plyr_1.7.1 proto_0.3-9.2 reshape2_1.2.1 scales_0.2.2 stringr_0.6 tools_2.15.2 > [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo