#' Set Longitude label
#'
#' @description Use Longitude ºW or Longitude ºE as X 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_x_long <- function(xmin=-180, xmax=180, step=1, ...) {
xbreaks <- seq(xmin,xmax,step)
xlabels <- unlist(lapply(xbreaks, function(x) ifelse(x < 0, parse(text=paste0(x,"^o", "*W")), ifelse(x > 0, parse(text=paste0(x,"^o", "*E")),x))))
return(scale_x_continuous("Longitude", breaks = xbreaks, labels = xlabels, expand = c(0, 0), ...))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.