plot min and max lines
This commit is contained in:
parent
54312b2577
commit
f3180a35cc
@ -30,6 +30,14 @@ DRAW_WC = worst_case > 0
|
||||
LEGEND_POS="topleft"
|
||||
#LEGEND_POS="bottomright"
|
||||
|
||||
alpha <- function(col, alpha=1){
|
||||
if(missing(col))
|
||||
stop("Please provide a vector of colours.")
|
||||
apply(sapply(col, col2rgb)/255, 2,
|
||||
function(x)
|
||||
rgb(x[1], x[2], x[3], alpha=alpha))
|
||||
}
|
||||
|
||||
# Trimm a list of data frames to common length
|
||||
trim_data <- function(input,len=NULL) {
|
||||
if (is.null(len)) {
|
||||
@ -139,13 +147,17 @@ plot(c(1,length(one_frame[[1]])),c(ylow,yhigh), col='white', xlab="Iters", ylab=
|
||||
for (t in seq_len(length(typenames))) {
|
||||
proj = one_frame[seq(1, dim(one_frame)[1], by=max(1, length(one_frame[[1]])/(10*w_))),]
|
||||
#points(proj[c('iters',typenames[t])], col=MY_COLORS_[t], pch='.')
|
||||
drawlines = ml2lines(one_frame[[typenames[t]]])
|
||||
lines(drawlines, col=MY_COLORS_[t])
|
||||
avglines = ml2lines(one_frame[[typenames[t]]])
|
||||
lines(avglines, col=MY_COLORS_[t])
|
||||
if (exists("RIBBON") && RIBBON=='both') {
|
||||
points(proj[c('iters',sprintf("%s_min",typenames[t]))], col=MY_COLORS_[t], pch='.')
|
||||
points(proj[c('iters',sprintf("%s_max",typenames[t]))], col=MY_COLORS_[t], pch='.')
|
||||
milines = ml2lines(one_frame[[sprintf("%s_min",typenames[t])]])
|
||||
malines = ml2lines(one_frame[[sprintf("%s_max",typenames[t])]])
|
||||
lines(milines, col=MY_COLORS_[t], lty='dashed')
|
||||
lines(malines, col=MY_COLORS_[t], lty='dashed')
|
||||
#points(proj[c('iters',sprintf("%s_min",typenames[t]))], col=MY_COLORS_[t], pch='.')
|
||||
#points(proj[c('iters',sprintf("%s_max",typenames[t]))], col=MY_COLORS_[t], pch='.')
|
||||
}
|
||||
if (RIBBON != '') {
|
||||
if (exists("RIBBON") && RIBBON != '') {
|
||||
for (i in seq_len(dim(proj)[1])) {
|
||||
row = proj[i,]
|
||||
x_ <- row['iters'][[1]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user