Commit 495e2ccc authored by Burkhardt Rockel's avatar Burkhardt Rockel

v2.1.2

correct bug for plotting the right triangle in plot_colourbar.R
parent 2440ad24
...@@ -73,7 +73,7 @@ function(levs, cols, side=1, ylab="", labels=NULL, ...@@ -73,7 +73,7 @@ function(levs, cols, side=1, ylab="", labels=NULL,
image(1:ncols, 1, lev.arr, axes=F, add=TRUE, breaks=1:(ncols+1)-0.5, col=c(cols[col.start:col.end],NA), image(1:ncols, 1, lev.arr, axes=F, add=TRUE, breaks=1:(ncols+1)-0.5, col=c(cols[col.start:col.end],NA),
ylab=ylab, xlab=xlab, ...) ylab=ylab, xlab=xlab, ...)
abline(v=col.start:col.end + 0.5, col=border) abline(v=col.start:col.end + 0.5, col=border)
polygon(right_triangle$x, left_triangle$y,col=cols[1],border=border) polygon(right_triangle$x, left_triangle$y,col=cols[ncols],border=border)
} }
} else { } else {
#... no triangles at the ends #... no triangles at the ends
...@@ -124,7 +124,7 @@ function(levs, cols, side=1, ylab="", labels=NULL, ...@@ -124,7 +124,7 @@ function(levs, cols, side=1, ylab="", labels=NULL,
image(1, 1:ncols, lev.arr, axes=F, add=TRUE, breaks=1:(ncols+1)-0.5, col=c(cols[col.start:col.end],NA), image(1, 1:ncols, lev.arr, axes=F, add=TRUE, breaks=1:(ncols+1)-0.5, col=c(cols[col.start:col.end],NA),
ylab=ylab, xlab=xlab, ...) ylab=ylab, xlab=xlab, ...)
abline(h=col.start:col.end + 0.5, col=border) abline(h=col.start:col.end + 0.5, col=border)
polygon(top_triangle$x, top_triangle$y,col=cols[1],border=border) polygon(top_triangle$x, top_triangle$y,col=cols[ncols],border=border)
} }
} else { } else {
#... no triangles at the ends #... no triangles at the ends
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment