#' Set Latitude label
#'
#' @description Use Latitude ºS or Latitude ºN as Y axis label. For internal use in plot_telemetry()
#' @noRd
#' @keywords internal
#'
#' @details check https://stackoverflow.com/questions/33302424/format-latitude-and-longitude-axis-labels-in-ggplot
scale_y_lat <- function(ymin=-90, ymax=90, step=0.5, ...) {
ybreaks <- seq(ymin,ymax,step)
ylabels <- unlist(lapply(ybreaks, function(x) ifelse(x < 0, parse(text=paste0(x,"^o", "*S")), ifelse(x > 0, parse(text=paste0(x,"^o", "*N")),x))))
return(scale_y_continuous("Latitude", breaks = ybreaks, labels = ylabels, expand = c(0, 0), ...))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.