# [AniMov] Defining xlim & ylim in NNCH graphs

Deepak deepaksalea at gmail.com
Fri Dec 18 18:16:44 CET 2009

```Thanks a lot for that help Clément. Will try it and write again.

Regards,
Deepak

2009/12/18 Clément Calenge <clement.calenge at oncfs.gouv.fr>

> Dear Deepak,
>
> Sorry for the late reply,
>
>
>  I've been trying to define limits of the X and Y axis of NNCH isopleths. I
>> get an error message > plot(homerange,xlim=c(0,600),ylim=c(0,700))
>> Error in plot.default(x[[1L]], x[[2L]], xlab = xlab, ylab = ylab, ...) :
>>  formal argument "xlim" matched by multiple actual arguments
>>
>> I could do it for MCP
>> Is there any command to define it?.
>>
>
> Actually, the arguments xlim and ylim are defined internally in the
> function plot.NNCH, and so cannot be used as arguments in this function. One
> possibility is to first prepare the plot and then to plot the home range,
>
>
> ## prepare the data
> data(chamois)
> xy <- chamois\$locs
>
> ## estimate the home range
> nn <- NNCH(xy, k=6)
>
> ## The x and y limits
> xli = c(min(xy[,1])-10000, max(xy[,1])+10000)
> yli = c(min(xy[,2])-10000, max(xy[,2])+10000)
>
> ## First prepare the plot. Do not forget
> ## asp=1, which ensures that one unit
> ## in x has the same length as
> ## one unit in y
> plot(c(0,1), xlim = xli, ylim=yli, asp=1, ty="n")
>
> ## then draw the plot, with add=TRUE
>
>
> Regards,
>
> Clément Calenge
>
> --
> Clément CALENGE
> Cellule d'appui à l'analyse de données
> Office national de la chasse et de la faune sauvage
> Saint Benoist - 78610 Auffargis
> tel. (33) 01.30.46.54.14
>
> _______________________________________________
> AniMov mailing list
> AniMov at faunalia.it
> http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
>

--
V.Deepak
Research Fellow
Wildlife Institute of India,
P.O. Box # 18, Chandrabani,