if (FALSE) {
if (interactive) {
x3p <- x3p_read(system.file("sample-land.x3p", package="x3ptools"))
x3p %>% image_x3p(size=dim(x3p$surface.matrix), multiply=1, zoom=.3)
x3p <- x3p_extract_profile(x3p, update=TRUE, col="#FFFFFF")
x3p$line_df %>%
ggplot(aes(x = x, y = value)) + geom_line()
x3p$line_df$y <- 1
sigs <- bulletxtrctr::cc_get_signature(ccdata = x3p$line_df,
grooves = list(groove=range(x3p$line_df$x)), span1 = 0.75, span2 = 0.03)
sigs %>%
ggplot(aes(x = x)) +
geom_line(aes(y = raw_sig), colour = "grey50") +
geom_line(aes(y = sig), size = 1) +
theme_bw()
}}
Run the code above in your browser using DataLab