Permalink
Cannot retrieve contributors at this time
# | |
# mixed-mod-dia.R, 23 Apr 20 | |
# Data from: | |
# Example | |
# | |
# Example from: | |
# Evidence-based Software Engineering: based on the publicly available data | |
# Derek M. Jones | |
# | |
# TAG example | |
source("ESEUR_config.r") | |
plot_layout(3, 1) | |
num_lines=6 | |
pal_col=rainbow(num_lines) | |
base_plot=function() | |
{ | |
plot(-1, -1, lab=c(1, 1, 2), | |
xaxs="i", yaxs="i", | |
xlim=c(0, 1), ylim=c(0, 1), | |
xlab="", ylab="") | |
} | |
lines_parallel=function(col_num) | |
{ | |
yslope=0.2 | |
ybase=rnorm(1, mean=0.4, sd=0.2) | |
yline=c(ybase, ybase+yslope) | |
lines(c(0, 1), yline, col=pal_col[col_num]) | |
} | |
lines_star=function(col_num) | |
{ | |
yslope=rnorm(1, sd=0.5) | |
yline=c(0.2, 0.5+yslope) | |
lines(c(0, 1), yline, col=pal_col[col_num]) | |
} | |
lines_everywhich=function(col_num) | |
{ | |
ybase=rnorm(1, mean=0.5, sd=0.3) | |
yslope=rnorm(1, mean=0.3, sd=0.2) | |
yline=c(ybase*(1-yslope), ybase*(1+yslope)) | |
lines(c(0, 1), yline, col=pal_col[col_num]) | |
} | |
base_plot() | |
dummy=sapply(1:num_lines, function(X) lines_parallel(X)) | |
base_plot() | |
dummy=sapply(1:num_lines, function(X) lines_star(X)) | |
base_plot() | |
dummy=sapply(1:num_lines, function(X) lines_everywhich(X)) | |