[R-sig-eco] How to manipulatechange the space between the numbers of axes (equal interval)? How to add a legend to a map (plot raster)?
Karlo Gregório
k@rlogregorio @ending from gm@il@com
Thu Nov 29 18:21:05 CET 2018
Hello Lara,
Did you try just using the plot function?
Something like this:
plot(proj22PA)
Cheers,
*Karlo Gregório Guidoni Martins*
PhD Student in Ecology and Evolution
Community Ecology and Functioning Lab
Universidade Federal de Goiás - Brazil
skype: kguidonimartins
+55 28 9 9992 2969
On Thu, Nov 29, 2018 at 2:52 PM Lara Silva <lara.sfp.silva using gmail.com> wrote:
> Hello,
> I´m trying to plot a map in R. Is it possible to change the values of
> x.axis and y.axis and have the same interval (space between the numbers)?
> How to add a legend for the map?
>
> https://www.dropbox.com/s/60tavy6vez33mw3/Plot_map.tiff?dl=0
>
> > class(proj22PA$P_EMmeanByROC_mergedAlgo_mergedRun_mergedData)
> [1] "RasterLayer"
> attr(,"package")
> [1] "raster"
> >
> > proj22PA$P_EMmeanByROC_mergedAlgo_mergedRun_mergedData
> class : RasterLayer
> band : 2 (of 2 bands)
> dimensions : 277, 412, 114124 (nrow, ncol, ncell)
> resolution : 100, 100 (x, y)
> extent : 461214, 502414, 4272892, 4300592 (xmin, xmax, ymin, ymax)
> coord. ref. : NA
> data source : grid
> names : P_EMmeanByROC_mergedAlgo_mergedRun_mergedData
> values : 42, 924 (min, max)
>
> >
>
> Code:
>
> plot(proj22PA$P_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
> axes=FALSE,legend=FALSE,box=FALSE,par(mar=c(3,3,0.5,0.5),mgp=c(2,1,0)))
> axis(side = 1, at =c(470000,480000,500000),labels= c("470000", "480000",
> "500000"))
> axis(side = 2, at =c(4272892,4300592),labels= c("4272892", "4300592"))
> box()
>
> Regards,
>
> Silva
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list