My question is quite challenging for me so far. Hope with your help we can get what I need.
I want to place an image as background of a ggplot.
Data to reproduce : Two objects are necessary: a data frame and an image.
DATA at the end of this question.
Background image:
And this is the image to place as background (molar.png):
What I got so far...
I ggplotted:
library(png)
library(grid)
library(ggplot2)
img <- readPNG("images/molar.png")
g <- rasterGrob(img, interpolate = TRUE)
ggplot(df), aes(x = X, y = Y)) +
coord_fixed(ratio = .75) +
annotation_custom(g, xmin=-Inf, xmax=Inf, ymin=-Inf, ymax=Inf) +
geom_point(alpha = .20, size = 1, shape = 19, color = "red") +
stat_smooth(method = 'lm', formula = y ~ poly(x, 3)) +
xlim(0, 100) + ylim(0, 100) +
theme_minimal() +
geom_hline(aes(yintercept = 0), color = "red", lty = 2) +
geom_vline(aes(xintercept = 0), color = "red", lty = 2)
I got this result:
... and what I really want
1. Adapt the regression to this line
Take this red horizontal line as reference:
The X axis (from 0 to 100) must be fitted to this line, as shown now:
This is really what I want: to adapt the background image (without modifying its proportion) to that horizontal line, from the cusp tip (gray) to the ending of the white area to the right.
This would require to select two landmarks in the image, but don't know how to make it automatic by simply selecting one or two points, so that the regression automatically fits that distance.
2. Take measurements
I would like to measure the distance between the highest point of the regression and the point [100, 0], as shown below in green line.
The point here, how can we reference if we are having a scale in the image?
DATA
df <- structure(list(tooth_num = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10),
sample = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L,
24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L,
36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L,
48L, 49L, 50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L,
23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L,
35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L,
47L, 48L, 49L, 50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,
9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L,
21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L,
45L, 46L, 47L, 48L, 49L, 50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L,
19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L,
31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L,
43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 1L, 2L, 3L,
4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L,
29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L,
41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L,
15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L,
27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L,
39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L,
51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L,
14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L,
26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L,
38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L,
50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L,
13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L,
25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L,
37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L,
49L, 50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L,
24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L,
36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L,
48L, 49L, 50L, 51L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L,
23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L,
35L, 36L, 37L, 38L, 39L, 40L, 41L), X = c(0, 1.96207644325269,
3.96448989844662, 6.02285180886395, 8.15165005779206, 10.3635651674945,
12.6674140636077, 15.0640931778694, 17.5406465345979, 20.0647832611694,
22.5857329433686, 25.0458992379799, 27.3978582481916, 29.6291517474813,
31.8764771189544, 34.0520372099874, 36.1615029782313, 38.2134690535817,
40.2184171634735, 42.1879211839819, 44.1341445581471, 46.0695527612659,
48.0067272490216, 49.9582712234201, 51.9366936524031, 53.9541918066236,
56.0223057345439, 58.1471219902002, 60.015986446532, 62.0418690161973,
64.172643764213, 66.3646706538791, 68.5820610043302, 70.7926665021678,
72.9630123083219, 75.0533364802678, 77.0143642675254, 78.7889946597798,
80.3221949636097, 81.6792186440018, 83.1246290439824, 84.6572566946537,
86.2607918541562, 87.9199855179157, 89.6207074088368, 91.349834829432,
93.0950207010492, 94.844403612905, 96.5863082060859, 98.3089189787115,
100, 0, 2.07242714587787, 4.28691224245265, 6.60638277527078,
8.99634804343432, 11.4282251674021, 13.8802080085279, 16.3366019674999,
18.7865642588865, 21.2228067680933, 23.6405691464549, 26.0268342309397,
28.2980527055826, 30.4950596311624, 32.6499592979795, 34.7798224410736,
36.8956207286784, 39.0058437957066, 41.1183659656274, 43.2421092543673,
45.3894713560051, 47.5991212687389, 49.7770452245596, 51.9171025815641,
54.0147450240845, 56.0668835223753, 58.0722874535502, 60.0316719092865,
61.9474399302204, 63.8232002348162, 65.6632101130593, 67.4719472029522,
69.2537602596947, 71.1020020072457, 73.0197406878018, 74.8895017058263,
76.7134344938606, 78.4953847484249, 80.2407780197449, 81.9562954259909,
83.649499477401, 85.3283767502077, 87.0008805605653, 88.6745443161437,
90.3562154355033, 92.0029343703826, 93.595173297479, 95.1912911811735,
96.7911009335273, 98.3943073713479, 100, 0, 2.49538787860394,
4.98986333706054, 7.48094091039875, 9.95158514589746, 12.3765352721187,
14.7826711324534, 17.1741487059107, 19.5379450224354, 21.8376445004796,
24.2011429944043, 26.5151298348149, 28.7199538624058, 31.0167238490571,
33.2844073975993, 35.4322146421557, 37.6300939882099, 39.8422715265431,
41.8385466322099, 43.9606111742119, 46.1772777113709, 48.0735169131695,
50.1458450809683, 52.0775711992983, 54.0389983532847, 56.0114855556445,
57.9507899054059, 59.8445463497116, 61.7655941740918, 63.7919980969677,
65.7952774486913, 67.8300149894114, 69.6945929413499, 71.6911766995294,
73.5625774964864, 75.3913842466844, 77.1888383995349, 78.9539192357634,
80.672317733178, 82.2770969086854, 83.9169027294331, 85.5602445166866,
87.1949684008868, 88.8468983089335, 90.5308901736114, 92.1034422363185,
93.6509365884513, 95.3521507218448, 96.9695007185512, 98.5200274462478,
100, 0, 1.93071662500976, 3.82909585694513, 5.83503737371176,
7.96719181032991, 10.2303413170764, 12.617316402646, 15.1102082752161,
17.6402520534245, 20.1564846032436, 22.6509074609361, 25.0393836587477,
27.3129712478007, 29.4988321446333, 31.6158908190034, 33.5547876344398,
35.4063709991687, 37.2999307397267, 39.3177890463815, 41.2304325787261,
43.1170170017018, 45.1909193214654, 47.1049295380901, 49.1859515610248,
51.13271739105, 53.1310164292379, 55.0797239964915, 57.1128373874235,
58.9454191107869, 60.9254683084337, 62.9947826516433, 65.0902258076096,
67.1539265387035, 69.1321933211508, 71.0068236131378, 72.9528127482717,
74.868864278393, 76.7358744964615, 78.5828026706554, 80.4923369340278,
82.44389985077, 84.3433495275878, 86.0966137745744, 87.9057900961145,
89.7809605893561, 91.5773662545089, 93.2971230872706, 94.8659471916182,
96.5480144068937, 98.2832055612151, 100, 0, 2.45904597118919,
4.9478077699383, 7.4437174468872, 9.93045045419645, 12.3969081092835,
14.8359017068762, 17.2430125015322, 19.6157029336795, 21.9526351315638,
24.2532312350846, 26.5173310764965, 28.744978623416, 30.9362680921638,
33.0912151854599, 35.2096628761033, 37.2911746284744, 39.334940182215,
41.3396279466586, 43.3031840060133, 45.2225306271349, 47.2687426646706,
49.3178157378126, 51.3497697054769, 53.3645511784153, 55.3621224700994,
57.3424678778091, 59.3055999637205, 61.2515438521856, 63.1803529324531,
65.0920931559475, 66.9868618795333, 68.8647627411635, 70.7259245031432,
72.5704916304973, 74.3986274315152, 76.2105077766622, 78.0063242391239,
79.7862840948059, 81.5506040412458, 83.2995196192455, 85.0332663696068,
86.7521175196599, 88.4563337345588, 90.1461348523852, 91.8219291438623,
93.4838736361913, 95.1323766000954, 96.7676892790966, 98.3900943221571,
100, 0, 2.20427029931411, 4.42577825043187, 6.67629529636218,
8.96662563154085, 11.3064974908959, 13.704119943729, 16.165246307201,
18.6916215311874, 21.2788860284595, 23.9143289820342, 26.5756256258544,
29.2320665145903, 31.8490369716412, 34.3727083595587, 36.7961343283599,
39.1127253229244, 41.3113092041144, 43.3888560030568, 45.3501991751572,
47.2064997097139, 48.9732280089765, 50.6683743389121, 52.3111665976677,
53.9212675271295, 55.5183816810814, 57.1220463657154, 58.7515758904346,
60.4258971077205, 62.1633013292058, 63.9808505967227, 65.8934996324456,
67.912799670054, 70.0333597621695, 71.9831740002692, 73.9087652121441,
75.8101919344515, 77.6875628781259, 79.5410090537812, 81.3706865591696,
83.1767905164818, 84.9595299852075, 86.7191558367347, 88.4559245173709,
90.170123135482, 91.862066674033, 93.5320896282075, 95.1805376430287,
96.8077452136806, 98.414102584544, 100, 0, 2.50973310686108,
4.98257000649406, 7.40768627831619, 9.78047063985944, 12.100599944502,
14.3704650807463, 16.5940944776443, 18.776452301705, 20.9230915203372,
23.0399794423239, 25.1335076302947, 27.2106366228331, 29.2791814137006,
31.3594526601995, 33.4580064720123, 35.556233172214, 37.6533199380137,
39.7484638590935, 41.8408600426407, 43.9297035958428, 46.0141896258872,
48.0934993624991, 50.1668041229306, 52.2332633294661, 54.2920126144546,
56.3421658028046, 58.3828149119835, 60.4130261870291, 62.4318202756028,
64.4382019654095, 66.4311244992937, 68.4095034527027, 70.3722187161805,
72.3180946704221, 74.2459160462301, 76.1544160295474, 78.0422683314784,
79.9081070132353, 81.7505086436864, 83.5679982468404, 85.3590473193511,
87.1220777955072, 88.8554739421999, 90.5575664989655, 92.2266544854268,
93.8610012363035, 95.458856208853, 97.0184430879027, 98.537991505764,
100, 0, 2.49186292873155, 4.96628290858449, 7.40387310725186,
9.79133340002794, 12.1468199057625, 14.5011896071325, 16.8431655039685,
19.1723761535772, 21.4884872575346, 23.7911793751244, 26.0801603047613,
28.355162607706, 30.6159386554963, 32.8622655825162, 35.0939428097114,
37.310792044589, 39.5126572812178, 41.6993973713744, 43.8708934533968,
46.0270489521849, 48.1677771977769, 50.2930162830572, 52.4027142060487,
54.4968362987667, 56.5753602746497, 58.6382811811283, 60.6856064470565,
62.7173459775728, 64.7335369169464, 66.7342089805929, 68.7194141704892,
70.6892069648972, 72.6436517472169, 74.582822805987, 76.5067919534617,
78.4156508121718, 80.30948109951, 82.1883843431457, 83.8953343826177,
85.318702783443, 86.7569115580089, 88.2078484355329, 89.6694432420707,
91.1396480902398, 92.6164522369269, 94.0978597967267, 95.5818971707953,
97.0665932365733, 98.5499867766401, 100, 0, 2.61369623570294,
5.25019204546923, 7.89758672867171, 10.4854413123113, 13.0066240676632,
15.4846710718853, 17.9159547041448, 20.2976684759407, 22.6276875072264,
24.9044541625748, 27.1268476764071, 29.2940720764344, 31.4055784162507,
33.4609732842652, 35.4599616217844, 37.4022781047122, 39.2876574089524,
41.115772453938, 42.8862115298645, 44.5984417012627, 46.5824735364946,
48.8579364441288, 51.0689873528466, 53.2187049370753, 55.31212578009,
57.3558486751465, 59.3576503629965, 61.3261515894915, 63.2705517814855,
65.2004117555501, 67.125505044989, 69.0556829505137, 71.0007693255153,
72.9704141903561, 74.9739450593852, 77.0201427878221, 79.1169465130639,
80.9682934274075, 82.7378404654242, 84.4621062867744, 86.1441466931183,
87.7873262684694, 89.3952520481705, 90.9717460715737, 92.5207813382925,
94.0464474990516, 95.5529302701972, 97.0444725499921, 98.5253927168307,
100, 0, 2.19489342240264, 4.47470248895734, 6.80636996136228,
9.16189235515265, 11.5204119968896, 13.8679818386464, 16.1962336516669,
18.5008000956494, 20.7800403414259, 23.0340446346007, 25.2640080457511,
27.4717901812673, 29.6596690589774, 31.8301824946609, 33.9860569994518,
36.1301804326855, 38.2656102060449, 40.395611569574, 42.5237505919975,
44.6539625286031, 46.790726843019, 48.9392449637073, 51.1057000819157,
53.0838372365286, 55.0005198693747, 56.9159691456296, 58.8292579968134,
60.7394374767241, 62.645542230868, 64.5465987006055, 66.4416169190052,
68.3295795719832, 70.2094638760246, 72.080216965747, 73.9407777716216,
75.7900606116825, 77.6269798039636, 79.4504168499154, 81.2592587204191,
83.0523732433488), Y = c(84.5741422911491, 87.0989688246201,
89.5436034157802, 91.8694746551154, 94.0314174040144, 95.9740138468311,
97.628391911438, 98.9112343041615, 99.7302288176452, 100,
99.6682935009841, 98.7381965579207, 97.2664228638507, 95.3825982722905,
93.5434433368078, 91.50049262398, 89.2915552625009, 86.9514674858642,
84.511940176201, 82.0015588642778, 79.4462792120302, 76.8706085478357,
74.2982919192514, 71.7531887159568, 69.2602636348217, 66.8466919870944,
64.5423551809367, 62.3722941413001, 59.6800326256192, 57.2857466826492,
55.128758759083, 53.1294867372666, 51.2007256913408, 49.2527551687403,
47.1957784888164, 44.9429337520794, 42.418488359019, 39.5725891439776,
36.3973083864229, 33.0253591771941, 29.7461795438129, 26.5669349259918,
23.4758099710143, 20.4586262556193, 17.4994139966193, 14.5814411300049,
11.6872895390296, 8.79946487886403, 5.90043469063777, 2.97289519972717,
0, 93.0321380957158, 95.1946109521693, 96.937054277536, 98.2619255824812,
99.1910694062447, 99.7577986711693, 100, 99.9550821661862,
99.6575185832176, 99.1377550776607, 98.4215955114931, 97.4779796804826,
95.9441517048638, 94.1389735933651, 92.2010899059795, 90.1898222195824,
88.1388247774415, 86.0724678936469, 84.0123913148843, 81.9837162612796,
80.0234419211725, 78.2597001700458, 76.3926747068224, 74.4111019409554,
72.3108177571526, 70.0927095898208, 67.7621020453996, 65.3282107888812,
62.802504203367, 60.1968602570691, 57.5234982391254, 54.7931356266002,
52.0153976695973, 49.3678395136313, 46.8461605150396, 44.2290481856401,
41.5261960397215, 38.748799403644, 35.9094871516561, 33.021434271488,
30.098088807609, 27.1525574835635, 24.19719611686, 21.2436096189696,
18.3024472027724, 15.3103597044707, 12.2378569960892, 9.17074715833242,
6.10882539864554, 3.05175039610287, 0, 100, 99.9740960784806,
99.8730270144876, 99.6594688780895, 99.1648671200451, 98.300448086114,
97.3281159413371, 96.2806584450564, 95.1069839916948, 93.6992988433163,
92.5227992310794, 91.1519207300211, 89.4389990501897, 88.0315526476314,
86.5030621141021, 84.637382900149, 82.9008651750625, 81.2041782110219,
79.064856495856, 77.1370635776142, 75.4555767641426, 73.1766285349799,
71.1390523302985, 68.8176471360649, 66.5503178701644, 64.3037992816136,
61.9957638533255, 59.6077485751849, 57.270625947771, 55.1882053198138,
53.005988938906, 50.8933669646611, 48.4803231663425, 46.2904669191802,
43.8645308465569, 41.369278904061, 38.8252432322521, 36.2327421588907,
33.5735116287118, 30.7665372266409, 28.0047653665761, 25.244744309195,
22.4736613621324, 19.7247419854022, 17.0183591556834, 14.1736629139801,
11.3015506938947, 8.6188037004008, 5.82611425658707, 2.95264914351926,
0, 86.7221127164863, 89.2450865945842, 91.8256626160176,
94.2050712850442, 96.3082958568556, 98.0567601186487, 99.356578317864,
100, 99.8266960099512, 99.3672567218446, 98.6837623193952,
97.4546359200075, 95.8095875992727, 93.8391732848531, 91.6986699837336,
89.1914649315853, 86.5315472203614, 83.9427805951582, 81.5889388575256,
79.0374892354799, 76.4382738493923, 74.2129556980193, 71.6847000287053,
69.5197780116735, 67.026504640704, 64.6334322074442, 62.1466653908716,
59.8252416036741, 57.210640130131, 54.8147737058654, 52.5672567218449,
50.3760405702802, 48.1148980958759, 45.6822122284949, 43.0613338436512,
40.5655726724713, 38.0157305521002, 35.3812266768728, 32.7135011003732,
30.1526743852262, 27.6670940579847, 25.0888527413645, 22.2776767773419,
19.7712372021815, 17.1514304851209, 14.4034446464453, 11.542359582815,
8.48492967180167, 5.57098842216043, 2.73145153573813, 0,
99.1041781658029, 99.7254865136605, 100, 99.9614316109632,
99.6447768919466, 99.0834281892782, 98.3070217828948, 97.341621109093,
96.2090754809024, 94.9278903961505, 93.5136855943403, 91.9791492509625,
90.3350457026248, 88.5899864186136, 86.7511628918963, 84.8242550277467,
82.8134769494328, 80.7219434437174, 78.5514867381084, 76.302473278107,
73.9737121158334, 71.8911107192181, 69.810524772861, 67.694531029918,
65.5438623813919, 63.3593433296612, 61.1416609600414, 58.8917313862862,
56.6101958880234, 54.2979247733192, 51.9556967388641, 49.5842904813491,
47.1845305031526, 44.757241306653, 42.303109977166, 39.8229610170695,
37.317527317367, 34.7876333804369, 32.2340120972821, 29.657396358906,
27.058564861999, 24.438158886189, 21.7969571281666, 19.1356924789353,
16.4549604124345, 13.7555396253553, 11.0379797859501, 8.30305959090951,
5.55132870848586, 2.78342841830685, 0, 84.1515543172144,
86.2722836260793, 88.3566153916604, 90.3773896250419, 92.3062620354674,
94.111690717205, 95.7577913244362, 97.203231722867, 98.4009161759049,
99.2995644137824, 99.8474619227218, 100, 99.7284790643066,
99.0275302806241, 97.8277140842702, 96.2611985608363, 94.3983312397508,
92.2676143186827, 89.9054453409169, 87.3514589414394, 84.6443817904904,
81.8193876527848, 78.9076236667722, 75.9361708679116, 72.9289916301439,
69.9079560608225, 66.8938683956418, 63.9077697306659, 60.9718854638001,
58.1105727362662, 55.3511099671633, 52.7239337138365, 50.2623228580521,
47.9794231502588, 45.4070011187705, 42.7981815439979, 40.1541092510553,
37.4757316814164, 34.7641541834675, 32.0204031521378, 29.2455049823579,
26.4404465923295, 23.6062938537105, 20.7439547312464, 17.8544950965959,
14.9388623912317, 11.9979251031726, 9.0326701506196, 6.04400549831871,
3.03283911101569, 0, 100, 99.5848739044175, 98.8739209129315,
97.9105346461211, 96.7351022995956, 95.3831954679074, 93.885250878182,
92.2670226841415, 90.5504870541479, 88.7545871260625, 86.8960843842295,
84.9905164585802, 83.0528356573708, 81.0986594271243, 79.1673905588146,
77.2717198905873, 75.3754106896234, 73.4768134130185, 71.5743849399925,
69.6665023331719, 67.7516224717761, 65.8282022350241, 63.8947517131965,
61.9497011799818, 59.9915873311911, 58.0188670460438, 56.0301302314122,
54.0238603720464, 51.9985941637575, 49.9528949078877, 47.8852726947172,
45.794397247711, 43.6787786571497, 41.5370334354364, 39.3678047005055,
37.1697621758216, 34.941522373788, 32.6818614399924, 30.3895023089609,
28.063247731812, 25.7019536707251, 23.304582510003, 20.8700966339479,
18.3975648489857, 15.8861889891947, 13.3352240997155, 10.7440582533417,
8.11223915605116, 5.43939433041456, 2.72533753771655, 0,
100, 99.9134879636606, 99.4737726511386, 98.7119319033914,
97.6645725261045, 96.4711111592938, 95.2721931018034, 94.0226109361477,
92.7232680879358, 91.374959571704, 89.9785165390125, 88.5348785524954,
87.0449851747857, 85.5095952833957, 83.9297207150073, 82.3061926211812,
80.6400228385995, 78.9320063817987, 77.1831189504364, 75.3942278330975,
73.5662725924159, 71.7000843799518, 69.7965666213147, 67.8565504680649,
65.8809393458113, 63.8706005431396, 61.8262568005362, 59.7488476806353,
57.6390236498756, 55.4977604079147, 53.3256361471427, 51.123554293169,
48.8921653124316, 46.6322280824431, 44.344429206666, 42.0294914255877,
39.6880290686225, 37.3207287392334, 34.9282409038592, 32.3093546108134,
29.3214008878868, 26.3486608522194, 23.3891108304469, 20.4407632862286,
17.5015222721514, 14.5693279778263, 11.6421205928639, 8.71769575877807,
5.79402980220384, 2.86895450167932, 0, 99.0881176828924,
99.616812993443, 99.9245775334157, 100, 99.4144184933504,
98.4080380989905, 97.2482296158507, 95.9447863261935, 94.5072176490275,
92.9445788221548, 91.2653289705444, 89.4773594926569, 87.5879656741198,
85.6037331424258, 83.5306797985592, 81.3743977486237, 79.139712667937,
76.8311379822374, 74.4527045497319, 72.0079322747694, 69.5001707437473,
67.4173241176181, 65.7355478830473, 63.9261751158092, 62.0062376111431,
59.9926536189868, 57.9018588217461, 55.7494373120646, 53.5502067518011,
51.3181332130511, 49.0667285867045, 46.8089938097941, 44.5579865920031,
42.3268498019911, 40.129152103299, 37.979256976578, 35.89220917429,
33.8840753566102, 31.5408977402496, 29.095103557573, 26.6000023276786,
24.0608455207656, 21.4827994480562, 18.8707181711938, 16.2292854338693,
13.56295788917, 10.8759367132551, 8.1722811506567, 5.45590851427953,
2.73059418540176, 0, 96.4662652426023, 98.0232502530471,
99.1147667554613, 99.7607331141328, 100, 99.8803419056255,
99.4511603186742, 98.7585534337238, 97.843294734107, 96.7405371746194,
95.4801583016932, 94.0874997966255, 92.5842056245715, 90.989010880653,
89.3184813331895, 87.587358543869, 85.8094473196242, 83.9978129241588,
82.1654220154131, 80.3260794003192, 78.4945266405658, 76.6880690477,
74.9274631350027, 73.2399733961649, 70.9563625122581, 68.4738638027609,
65.9881111030584, 63.4970829949925, 60.9982157287041, 58.4893399773897,
55.9680398998363, 53.4319489577125, 50.8788978242146, 48.3064706581295,
45.7125474355354, 43.0948602238647, 40.4513876049598, 37.7800095548987,
35.0788032612873, 32.3458952146129, 29.5794612082463)), .Names = c("tooth_num",
"sample", "X", "Y"), row.names = c(NA, 500L), class = "data.frame")