-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from MindTheGap-ERC/improve_plotting
Improve plotting
- Loading branch information
Showing
18 changed files
with
380 additions
and
103 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
make_adm_canvas = function(){ | ||
|
||
#' | ||
#' @noRd | ||
#' @keywords internal | ||
#' | ||
#' @title initialize amd plot | ||
#' | ||
#' @description | ||
#' generates an empty plot for adm plotting | ||
#' | ||
#' | ||
#' @returns invisible NULL | ||
|
||
list = get("adm_plot_info", envir = .adm_plot_env) | ||
|
||
|
||
|
||
plot(NULL, | ||
xlim = list$t_range, | ||
ylim = list$h_range, | ||
xlab = "", | ||
ylab = "") | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
plot_acc_parts = function(lwd_acc = 1, lty_acc = 1, | ||
col_acc = "black"){ | ||
|
||
#' | ||
#' @keywords internal | ||
#' @noRd | ||
#' | ||
#' @title draw sed accumulation | ||
#' | ||
#' @description | ||
#' draws time intervals where sediment is accumulated | ||
#' | ||
#' @param lwd_acc line width | ||
#' @param lty_acc line type | ||
#' @param col_acc color | ||
#' | ||
#' @returns invisible NULL | ||
|
||
|
||
list = get("adm_plot_info", envir = .adm_plot_env) | ||
|
||
x = list$adm | ||
|
||
for ( i in seq_along(x$destr)){ | ||
if (!x$destr[i]){ | ||
graphics::lines(x = c(x$t[c(i, i+1)]), | ||
y = c(x$h[c(i, i+1)]), | ||
col = col_acc, | ||
lwd = lwd_acc, | ||
lty = lty_acc) | ||
} | ||
} | ||
return(invisible()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
plot_destr_parts = function(lwd_destr = 1, lty_destr = 3, col_destr = "black"){ | ||
|
||
#' | ||
#' @keywords internal | ||
#' @noRd | ||
#' | ||
#' @title draw destr. intervals | ||
#' | ||
#' @description | ||
#' draws time intervals no sediment is accumulated and signals are destroyed | ||
#' | ||
#' @param lwd_destr line width | ||
#' @param lty_destr line type | ||
#' @param col_destr color | ||
#' | ||
#' @returns invisible NULL | ||
|
||
list = get("adm_plot_info", envir = .adm_plot_env) | ||
|
||
x = list$adm | ||
|
||
for ( i in seq_along(x$destr)){ | ||
if (x$destr[i]){ | ||
graphics::lines(x = c(x$t[c(i, i+1)]), | ||
y = c(x$h[c(i, i+1)]), | ||
col = col_destr, | ||
lwd = lwd_destr, | ||
lty = lty_destr) | ||
} | ||
} | ||
return(invisible()) | ||
} |
Oops, something went wrong.