[R] Plot.raster hides the axis layer
MacQueen, Don
macqueen1 at llnl.gov
Thu Oct 24 16:46:07 CEST 2013
This is by no means an explanation, but as a possible approach to consider:
plot(0:1, 0:1, xaxt='n', asp=1)
axis(1,at=c(0,1),labels=c("a","b"))
plot(m,add=TRUE)
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 10/24/13 6:28 AM, "Alaios" <alaios at yahoo.com> wrote:
>Hi all,
>I am trying to plot a raster object (I can explain why but the point is
>that it would be a raster objeçt)..
>
>I have selected a small code to show you exactly the problem
>
>
>require(raster)
>test<-matrix(data=runif(10000),nrow=100)
>m<-raster(test)
>plot(m,axes="FALSE")
>axis(1,at=c(0,1),labels=c("a","b")) # THIS DOES NOT CHANGE THE INVISIBLE
>AXIS WHILE
>
>
>
>
>plot(test,axes="FALSE")
>axis(1,at=c(0,1),labels=c("a","b")) # WHEN I AM PLOTTING A NON RASTER
>OBJECT THE AXIS APPEARS.
>
>Can someone explain me what I can do so a raster layer to show correctly
>the axis? Please remember that I have to do that on a raster object so
>coercing it will not help ..
>
>I would like to thank you in advance for your help
>
>Regards
>Alex
>
> [[alternative HTML version deleted]]
>
More information about the R-help
mailing list