Doubt: add a boderline map

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

Doubt: add a boderline map

Pereira
Hello,

I got a map through the plot function.

Code:

map <-plot(proj$A_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
main= "", xlab ="x.coords", ylab="y.coords", cex.axis=caxis)

However I needed to add a border line in my study area to become more
perceptible (Figure 1).

I tried the border(), rect () functions  but it gave error.

So, I tried to create a border line

Code:
nc.sids <- readShapePoly("PoligonoSM.shp")

plot(nc.sids, asp=1, main="")

nc.border <- unionSpatialPolygons(nc.sids, rep(1, nrow(nc.sids)))
plot(nc.border, asp=1, main="")


But I am having a lot of difficulties in building the script.

How can cross the information of the 2 plots?

https://www.dropbox.com/sh/y5by1sxjcvdl6rh/AAAIF4srkChW2FxeEfFG4d_ta?dl=0
Thanks.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Doubt: add a boderline map

Hugo Costa
Hi Lara,

have you tried to run the following?

map <-plot(proj$A_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
main= "", xlab ="x.coords", ylab="y.coords", cex.axis=caxis)

plot(nc.sids, asp=1, main="", add=TRUE)

Hugo

Lara Silva <[hidden email]> escreveu no dia terça, 20/11/2018
à(s) 16:04:

> Hello,
>
> I got a map through the plot function.
>
> Code:
>
> map <-plot(proj$A_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
> main= "", xlab ="x.coords", ylab="y.coords", cex.axis=caxis)
>
> However I needed to add a border line in my study area to become more
> perceptible (Figure 1).
>
> I tried the border(), rect () functions  but it gave error.
>
> So, I tried to create a border line
>
> Code:
> nc.sids <- readShapePoly("PoligonoSM.shp")
>
> plot(nc.sids, asp=1, main="")
>
> nc.border <- unionSpatialPolygons(nc.sids, rep(1, nrow(nc.sids)))
> plot(nc.border, asp=1, main="")
>
>
> But I am having a lot of difficulties in building the script.
>
> How can cross the information of the 2 plots?
>
> https://www.dropbox.com/sh/y5by1sxjcvdl6rh/AAAIF4srkChW2FxeEfFG4d_ta?dl=0
> Thanks.
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Doubt: add a boderline map

Pereira
Yes, it worked.

Thank you very much!

Lara

Hugo Costa <[hidden email]> escreveu no dia terça, 20/11/2018 à(s)
18:15:

> Hi Lara,
>
> have you tried to run the following?
>
> map <-plot(proj$A_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
> main= "", xlab ="x.coords", ylab="y.coords", cex.axis=caxis)
>
> plot(nc.sids, asp=1, main="", add=TRUE)
>
> Hugo
>
> Lara Silva <[hidden email]> escreveu no dia terça, 20/11/2018
> à(s) 16:04:
>
>> Hello,
>>
>> I got a map through the plot function.
>>
>> Code:
>>
>> map <-plot(proj$A_EMmeanByROC_mergedAlgo_mergedRun_mergedData,
>> main= "", xlab ="x.coords", ylab="y.coords", cex.axis=caxis)
>>
>> However I needed to add a border line in my study area to become more
>> perceptible (Figure 1).
>>
>> I tried the border(), rect () functions  but it gave error.
>>
>> So, I tried to create a border line
>>
>> Code:
>> nc.sids <- readShapePoly("PoligonoSM.shp")
>>
>> plot(nc.sids, asp=1, main="")
>>
>> nc.border <- unionSpatialPolygons(nc.sids, rep(1, nrow(nc.sids)))
>> plot(nc.border, asp=1, main="")
>>
>>
>> But I am having a lot of difficulties in building the script.
>>
>> How can cross the information of the 2 plots?
>>
>> https://www.dropbox.com/sh/y5by1sxjcvdl6rh/AAAIF4srkChW2FxeEfFG4d_ta?dl=0
>> Thanks.
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo