To visualize the Procrustes distances you will need the R library
ProcDistLandmarks_all_mean - the average Procrustes distance for each landmark, fixed and sliding
ProcDistLandmarks_surfaceall_mean - the average Procrustes distance for just the surface landmarks.
This file is created by selecting only the values that correspond to semi-landmarks:
ProcDistLandmarks_surfaceall_mean <- ProcDistLandmarks_all_mean
The fixed landmarks had much larger Procrustes
To create a color scale for the Procrustes distances:
- First scale the distances to a 0 to 1 range:
scaledmeandist <- (ProcDistLandmarks_all_mean-minmeandist)/(maxmeandist-minmeandist)
- Then add color to each
meanprocdistcolorscale <- color.scale(scaledmeandist)
Red to
meanprocdistcolorscale <- color.scale(scaledmeandist, c(0,1,1),c(1,1,0),0)
Green to blue:
meanprocdistcolorscale <- color.scale(scaledmeandist, 0,c(0,1,1),c(1,1,0))
- more info on color.scale() here: http://finzi.psych.upenn.edu/library/plotrix/html/color.scale.html
- and more info on the package plotrix here: https://cran.r-project.org/web/packages/plotrix/plotrix.pdf
-you can change the colors by changing the values after scaledmeandist, I don't quite understand what numbers correspond to what colors, but if you mess around with them you can figure out colors that work for you:
0, c(0,1,1), c(1,1,0) = green to blue
0, c(1,0), c(1,1) = dark blue to light blue
You can repeat the method with just the surface semi-landmarks, and with the male and female averages:
ProcDistLandmarks_surfaceall_mean <- ProcDistLandmarks_all_mean[ 110:969]
scaledmean_surfdist <- (ProcDistLandmarks_surfaceall_mean-min(ProcDistLandmarks_surfaceall_mean))/(max(ProcDistLandmarks_surfaceall_mean)-min(ProcDistLandmarks_surfaceall_mean))
mean_surfdist_colorscale <- color.scale(scaledmean_surfdist,0,c(0,1,1),c(1,1,0))
Files you end up with:
All landmarks:
scaledmeandist
meanprocdistcolorscale
scaledmean_surfdist
mean_surfdist_colorscale
No comments:
Post a Comment