Intro Thoughts

Status Quo

library(tidyverse)

data.frame(x = -1, y = -1, xend = 1, yend = 1) |>
  ggplot() + 
  coord_cartesian(xlim = c(-2,2), ylim = c(-2,2)) +
  aes(x, y, xend = xend, yend = yend) + 
  geom_point(alpha = .15, color = "red") +
  geom_label(label = "Insightful\nComment", 
             label.padding = unit(0.7, "lines"),
             vjust = .5, 
             hjust = 1,
             lineheight = .7,
             alpha = 0, # remove background
             label.size = 0) +
  annotate(geom = "point", x = 1, y = 1, color = "blue")

last_plot() +
  geom_segment(arrow = 
               arrow(ends = "last", length = unit(.1, "inches"), type = "closed"))

ggwipe::last_plot_wipe_last() +
  geom_curve(arrow = 
               arrow(ends = "last", length = unit(.1, "inches")),
             curvature = .25)

ggwipe::last_plot_wipe_last() +
  geom_path(data = data.frame(x = -50:50/50, y = -50:50/50),
            aes(xend = NULL, yend = NULL),
            arrow = 
               arrow(ends = "last", length = unit(.1, "inches")))

# from ggbump
sigmoid <- function(x_from, x_to, y_from, y_to, smooth = 5, n = 100, direction = "x") {
  if(!direction %in% c("x", "y")) {stop("Only the directions x or y is allowed.")}

  if(direction == "x") {
    x <- seq(-smooth, smooth, length = n)
    y <- exp(x) / (exp(x) + 1)
    out <- data.frame(x = (x + smooth) / (smooth * 2) * (x_to - x_from) + x_from,
                      y = y * (y_to - y_from) + y_from)
  }

  if(direction == "y") {
    y <- seq(-smooth, smooth, length = n)
    x <- exp(y) / (exp(y) + 1)
    out <- data.frame(y = (y + smooth) / (smooth * 2) * (y_to - y_from) + y_from,
                      x = x * (x_to - x_from) + x_from)
  }
  out
}

sigmoid(x_from = -1, x_to = 1, y_from = -1, y_to = 1, smooth = 5) ->
  sigmoid_path


ggwipe::last_plot_wipe_last() +
  geom_path(data = sigmoid_path,
            aes(xend = NULL, yend = NULL),
            arrow = 
               arrow(ends = "last", length = unit(.1, "inches")))

ggplot(cars) + 
  aes(speed, dist) + 
  geom_point() + 
  geom_point(data = . %>% .[1,], color = "red")

  # geom_label_link(data = . %>% [1,],
  #                 label = "a single experiment",
  #                 label_distance_sd = 2, 
  #                 label_direction = "SW",
  #                 exit_position = "SW",
  #                 pointer_pad)
`%||%` <- ggplot2:::`%||%`

compute_labellink <- function(data, scales, label_direction = 180, prop_range = .1, prop_pointer_pad = .01, hjust = NULL, vjust = NULL, which_index = NULL, which_id = NULL){
  
  if(is.null(data$id)){data$id <- "hello world"}
  if(is.null(which_index)){which_index <- which(data$id == which_id)}
  
  data$default_label <- data$id
  
  
  range_x <- diff(range(data$x))
  range_y <- diff(range(data$y)) # look at range of plot?
  data$x_in_range <- (data$x-mean(range(data$x)))/range_x
  data$y_in_range <- (data$y-mean(range(data$y)))/range_y
  
  data$angle_from_midrange_degrees <- sign(data$y_in_range)* 
    atan(data$y_in_range/data$x_in_range)/pi*180
  if(is.null(label_direction)){
    data$label_direction <- data$angle_from_midrange_degrees
    } else {
    data$label_direction <- label_direction
  }
  
  data$xdir <- cos(pi*data$label_direction / 180)
  data$ydir <- sin(pi*data$label_direction / 180)
  data$xpush <- range_x * prop_range * data$xdir
  data$ypush <- range_y * prop_range * data$ydir
  data$hjust_default <- sign(data$xdir) != 1
  data$vjust_default <- sign(data$ydir) != 1

  data$more_x_than_y <- abs(data$xdir) > abs(data$ydir)
  
  if(is.null(hjust)){data$hjust <- ifelse(data$more_x_than_y, data$hjust_default, .5)
  }else{data$hjust <- hjust}
  if(is.null(vjust)){data$vjust <- ifelse(data$more_x_than_y, .5, data$vjust_default)
  }else{data$vjust <- vjust}

  data |> 
    mutate(x = x + xpush) |>
    mutate(y = y + ypush) |>
    mutate(xend = x - (xpush)) |>
    mutate(yend = y - (ypush)) |>
    # mutate(hjust = hjust) |>
    # mutate(vjust = vjust) |> 
    slice(which_index)
  
}

StatLabellink <- ggproto("Labellink",
                         Stat,
                         compute_panel = compute_labellink,
                         default_aes = aes(label = after_stat(default_label))
                         )
gapminder::gapminder |>
  filter(year == 2002) |> 
  select(id = country, x = lifeExp, y = gdpPercap) |>
  compute_labellink(which_id = "Chile")
## # A tibble: 1 × 19
##   id        x      y default_label x_in_range y_in_range angle_from_midrange_d…¹
##   <fct> <dbl>  <dbl> <fct>              <dbl>      <dbl>                   <dbl>
## 1 Chile  73.6 10779. Chile              0.403     -0.263                    33.1
## # ℹ abbreviated name: ¹​angle_from_midrange_degrees
## # ℹ 12 more variables: label_direction <dbl>, xdir <dbl>, ydir <dbl>,
## #   xpush <dbl>, ypush <dbl>, hjust_default <lgl>, vjust_default <lgl>,
## #   more_x_than_y <lgl>, hjust <lgl>, vjust <dbl>, xend <dbl>, yend <dbl>
gapminder::gapminder |>
  filter(year == 2002) |> 
  select(id = country, x = lifeExp, y = gdpPercap) |>
  compute_labellink(which_index = 3)
## # A tibble: 1 × 19
##   id          x     y default_label x_in_range y_in_range angle_from_midrange_…¹
##   <fct>   <dbl> <dbl> <fct>              <dbl>      <dbl>                  <dbl>
## 1 Algeria  66.7 5288. Algeria            0.243     -0.386                   57.8
## # ℹ abbreviated name: ¹​angle_from_midrange_degrees
## # ℹ 12 more variables: label_direction <dbl>, xdir <dbl>, ydir <dbl>,
## #   xpush <dbl>, ypush <dbl>, hjust_default <lgl>, vjust_default <lgl>,
## #   more_x_than_y <lgl>, hjust <lgl>, vjust <dbl>, xend <dbl>, yend <dbl>
gapminder::gapminder |>
  filter(year == 2002) |> 
  select(x = lifeExp, y = gdpPercap) |>
  compute_labellink(which_index = 3)
## Warning: Unknown or uninitialised column: `id`.
## # A tibble: 1 × 19
##       x     y id      default_label x_in_range y_in_range angle_from_midrange_…¹
##   <dbl> <dbl> <chr>   <chr>              <dbl>      <dbl>                  <dbl>
## 1  66.7 5288. hello … hello world        0.243     -0.386                   57.8
## # ℹ abbreviated name: ¹​angle_from_midrange_degrees
## # ℹ 12 more variables: label_direction <dbl>, xdir <dbl>, ydir <dbl>,
## #   xpush <dbl>, ypush <dbl>, hjust_default <lgl>, vjust_default <lgl>,
## #   more_x_than_y <lgl>, hjust <lgl>, vjust <dbl>, xend <dbl>, yend <dbl>
gapminder::gapminder |>
  filter(year == 2002) |> 
  select(id = country, x = lifeExp, y = gdpPercap) |>
  ggplot() + 
  aes(x = x, y = y, id = id) + 
  geom_point() + 
  layer("label", "labellink", position = "identity",
        params = list(which_id = "Chile")) + 
  layer("segment", "labellink", position = "identity",
        params = list(which_id = "Chile")) + 
  scale_x_log10()

layer_data(i = 2)
##   label        x        y    id PANEL group default_label x_in_range y_in_range
## 1 Chile 1.859254 10778.78 Chile     1    24         Chile   0.429822 -0.2628949
##   angle_from_midrange_degrees label_direction xdir         ydir       xpush
## 1                    31.45148             180   -1 1.224647e-16 -0.03206053
##          ypush hjust_default vjust_default more_x_than_y hjust vjust     xend
## 1 5.442674e-13          TRUE         FALSE          TRUE  TRUE   0.5 1.891314
##       yend colour  fill size angle alpha family fontface lineheight
## 1 10778.78  black white 3.88     0    NA               1        1.2
ggplot(cars) + 
  aes(speed, dist) + 
  geom_point() + 
  layer("segment", 
        "labellink", 
        position = "identity", 
        # data = cars[23,], 
        params = list(which_index = 23, arrow = 
                        arrow(ends = "last", 
                              length = unit(.1, "inches"), 
                              type = "closed"))) +
  layer("label", 
        "labellink", 
        position = "identity",  
        # data = cars[23,],
        params = list(which_index = 23, 
                      label = "let me tell you about this point" |> str_wrap(15),
                      alpha = 0,
                      lineheight = .8,
                      label.size = 0,
                      label.padding = unit(0.7, "lines"))) + 
  layer("point",
        "labellink",
        position = "identity",
        # data = cars[23,],
        params = list(which_index = 23, 
                      color = "red"))

geom_labellink <- function(  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE, ...){

  
  list( 
    
    layer("segment", 
        "labellink", 
        position = position, 
        data = data, 
        mapping = mapping,
            show.legend = show.legend,
    inherit.aes = inherit.aes,
        params = list(arrow = 
                        arrow(ends = "last", 
                              length = unit(.1, "inches"), 
                              type = "closed"), na.rm = na.rm,
                      ...)),
    
  layer("label", 
        "labellink", 
        position = position, 
        data = data, 
        mapping = mapping, 
            show.legend = show.legend,
    inherit.aes = inherit.aes,
        params = list(
                      alpha = 0,
                      lineheight = .8,
                      label.size = 0,
                      label.padding = unit(0.4, "lines"), 
                      na.rm = na.rm,
                      ...)) 
  )

  
}
ggplot(cars, aes(speed, dist)) +
  geom_point() + 
  geom_labellink(which_index = 23,
                 label = "hello.\nI'm a\nlabel link.",
                 vjust = .5) + 
  geom_labellink(which_index = 29,
                 label = "Here's another\npoint of interest",
                 label_direction = -45,
                 vjust = .5,
                 prop_pointer_pad = .1)
## Warning in geom_labellink(which_index = 23, label = "hello.\nI'm a\nlabel
## link.", : Ignoring unknown parameters: `label`
## Warning in geom_labellink(which_index = 29, label = "Here's another\npoint of
## interest", : Ignoring unknown parameters: `label`

gapminder::gapminder |>
  filter(year == 2002) |>
ggplot() + 
  aes(gdpPercap, lifeExp) +
  geom_point(color = "darkgray") + 
  aes(label = country) + 
  geom_labellink(which_index = 5,
                 label_direction = -54,
                 prop_range = .5, 
                 hjust = .3,
                 prop_pointer_pad = .05)

last_plot() + 
  scale_x_log10()

gapminder::gapminder |>
  filter(year == 2002) |>
ggplot() + 
  aes(gdpPercap, lifeExp) +
  geom_point(color = "darkgray") + 
  geom_labellink(which_id = "Chile",
                 aes(id = country),
                 label_direction = 45) + 
  geom_labellink(which_id = "United States",
                 aes(id = country),
                 label = "The US is here",
                 label_direction = -100)
## Warning in geom_labellink(which_id = "Chile", aes(id = country), label_direction = 45): Ignoring unknown aesthetics: id
## Ignoring unknown aesthetics: id
## Warning in geom_labellink(which_id = "United States", aes(id = country), :
## Ignoring unknown parameters: `label`
## Warning in geom_labellink(which_id = "United States", aes(id = country), : Ignoring unknown aesthetics: id
## Ignoring unknown aesthetics: id

last_plot() + 
  scale_x_log10()

gapminder::gapminder |>
  filter(year == 2002) |>
ggplot() + 
  aes(gdpPercap, lifeExp, id = country) +
  geom_point(color = "darkgray") + 
  geom_labellink(which_id = "Brazil",
                 label = "People want to\nknow about Brazil",
                 label_direction = -70,
                 prop_range = .2) + 
  geom_labellink(which_id = "Norway",
                 label = "Here is Norway",
                 label_direction = -120)
## Warning in geom_labellink(which_id = "Brazil", label = "People want to\nknow
## about Brazil", : Ignoring unknown parameters: `label`
## Warning in geom_labellink(which_id = "Norway", label = "Here is Norway", :
## Ignoring unknown parameters: `label`

Alternative: contributed from Teun Van Den Brand (https://github.com/teunbrand/ggplot-extension-club/discussions/8)

gapminder::gapminder |>
  filter(year == 2002) |>
  ggplot() +
  aes(gdpPercap, lifeExp) +
  geom_point(colour = "darkgrey") +
  ggrepel::geom_text_repel(
    aes(label = c("Chile" = "Chile", 
                  "United States" = 
                    "The US is here")[as.character(country)]),
    na.rm = TRUE, 
    box.padding = unit(1, "cm"),
    point.padding = unit(5, "mm"),
    arrow = arrow(length = unit(2, "mm"), 
                  type = "closed")
  )

layer_data()
##              x      y PANEL group shape   colour size fill alpha stroke
## 1     726.7341 42.129     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 2    4604.2117 75.651     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 3    5288.0404 70.994     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 4    2773.2873 41.003     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 5    8797.6407 74.340     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 6   30687.7547 80.370     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 7   32417.6077 78.980     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 8   23403.5593 74.795     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 9    1136.3904 62.013     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 10  30485.8838 78.320     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 11   1372.8779 54.406     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 12   3413.2627 63.883     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 13   6018.9752 74.090     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 14  11003.6051 46.634     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 15   8131.2128 71.006     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 16   7696.7777 72.140     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 17   1037.6452 50.650     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 18    446.4035 47.360     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 19    896.2260 56.752     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 20   1934.0114 49.856     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 21  33328.9651 79.770     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 22    738.6906 43.308     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 23   1156.1819 50.525     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 24  10778.7838 77.860     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 25   3119.2809 72.028     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 26   5755.2600 71.682     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 27   1075.8116 62.974     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 28    241.1659 44.966     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 29   3484.0620 52.970     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 30   7723.4472 78.123     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 31   1648.8008 46.832     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 32  11628.3890 74.876     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 33   6340.6467 77.158     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 34  17596.2102 75.510     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 35  32166.5001 77.180     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 36   1908.2609 53.373     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 37   4563.8082 70.847     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 38   5773.0445 74.173     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 39   4754.6044 69.806     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 40   5351.5687 70.734     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 41   7703.4959 49.348     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 42    765.3500 55.240     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 43    530.0535 50.725     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 44  28204.5906 78.370     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 45  28926.0323 79.590     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 46  12521.7139 56.761     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 47    660.5856 58.041     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 48  30035.8020 78.670     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 49   1111.9846 58.453     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 50  22514.2548 78.256     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 51   4858.3475 68.978     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 52    945.5836 53.676     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 53    575.7047 45.504     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 54   1270.3649 58.137     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 55   3099.7287 68.565     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 56  30209.0152 81.495     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 57  14843.9356 72.590     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 58  31163.2020 80.500     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 59   1746.7695 62.879     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 60   2873.9129 68.588     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 61   9240.7620 69.451     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 62   4390.7173 57.046     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 63  34077.0494 77.783     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 64  21905.5951 79.696     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 65  27968.0982 80.240     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 66   6994.7749 72.047     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 67  28604.5919 82.000     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 68   3844.9172 71.263     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 69   1287.5147 50.992     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 70   1646.7582 66.662     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 71  19233.9882 77.045     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 72  35110.1057 76.904     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 73   9313.9388 71.028     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 74   1275.1846 44.593     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 75    531.4824 43.753     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 76   9534.6775 72.737     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 77    894.6371 57.286     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 78    665.4231 45.009     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 79  10206.9779 73.044     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 80    951.4098 51.818     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 81   1579.0195 62.247     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 82   9021.8159 71.954     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 83  10742.4405 74.902     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 84   2140.7393 65.033     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 85   6557.1943 73.981     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 86   3258.4956 69.615     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 87    633.6179 44.026     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 88    611.0000 59.908     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 89   4072.3248 51.479     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 90   1057.2063 61.340     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 91  33724.7578 78.530     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 92  23189.8014 79.110     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 93   2474.5488 70.836     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 94    601.0745 54.496     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 95   1615.2864 46.608     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 96  44683.9753 79.050     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 97  19774.8369 74.193     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 98   2092.7124 63.610     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 99   7356.0319 74.712     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 100  3783.6742 70.755     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 101  5909.0201 69.906     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 102  2650.9211 70.303     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 103 12002.2391 74.670     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 104 19970.9079 77.290     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 105 18855.6062 77.778     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 106  6316.1652 75.744     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 107  7885.3601 71.322     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 108   785.6538 43.413     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 109  1353.0924 64.337     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 110 19014.5412 71.626     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 111  1519.6353 61.600     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 112  7236.0753 73.213     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 113   699.4897 41.012     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 114 36023.1054 78.770     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 115 13638.7784 73.800     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 116 20660.0194 76.660     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 117   882.0818 45.936     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 118  7710.9464 53.365     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 119 24835.4717 79.780     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 120  3015.3788 70.815     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 121  1993.3983 56.369     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 122  4128.1169 43.869     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 123 29341.6309 80.040     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 124 34480.9577 80.620     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 125  4090.9253 73.053     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 126 23235.4233 76.990     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 127   899.0742 49.651     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 128  5913.1875 68.564     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 129   886.2206 57.561     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 130 11460.6002 68.976     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 131  5722.8957 73.042     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 132  6508.0857 70.845     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 133   927.7210 47.813     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 134 29478.9992 78.471     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 135 39097.0995 77.310     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 136  7727.0020 75.307     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 137  8605.0478 72.766     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 138  1764.4567 73.017     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 139  4515.4876 72.370     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 140  2234.8208 60.308     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 141  1071.6139 39.193     1    -1    19 darkgrey  1.5   NA    NA    0.5
## 142   672.0386 39.989     1    -1    19 darkgrey  1.5   NA    NA    0.5