This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
#' create a data frame with test data. | |
my.df <- data.frame(index = 1:10, value = rnorm(10)) | |
#' create the ggplot object | |
my.ggp <- ggplot(data = my.df, aes(x = index, y = value)) + geom_point() + geom_line() | |
#' get the x- and y-axis ranges actually used in the graph | |
# This worked in early versions of ggplot2 (probably <2.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Helper | |
safeRunCommand() { | |
typeset cmd="$*" | |
typeset ret_code | |
echo cmd=$cmd | |
eval $cmd | |
ret_code=$? |