geomorphR/geomorph

plotRefToTarget(): limits to plotting area

Closed this issue · 0 comments

I have been having an issue while trying to overlay points onto curves.

I think this is this due to the internally defined limits() function in plotRefToTarget(). I have noted that limits(s=1.25)?

The outcome, outlines using plotRefToTarget() are potentially cut off due to restricting the plotting area.

Maybe an option would be to provide an argument that allows users to specify the plotting area limits? E.g., such that limits(s=set.scale)?

Here is an example using landmarks of a fish head.

Warping mean predicted shape to landmarks of the mean specimen:

shapeData$mean$curves <- warpRefOutline(file=meanTpsFile
                                        , coord=shapeData$rawArr[,,names(shapeData$mean$specimen)]
                                        , ref=shapeData$mean$predict)

image

Plotting mean predicted shape to itself, on top of the outline coordinates, with constrained plotting area that does not encompass entire outline.

plotRefToTarget(shapeData$mean$predict, shapeData$mean$predict, outline=shapeData$mean$curves$outline
                , gridPars=gridPar(pt.bg='black', grid.col=NULL, tar.out.col='#999999', tar.pt.bg='#999999'
                                   , tar.pt.size = 0.5))

image