Browse code

reset data scale only when ylim is not set

jokergoo authored on 16/11/2018 09:02:32
Showing1 changed files

... ...
@@ -1103,7 +1103,7 @@ anno_barplot = function(x, baseline = 0, which = c("column", "row"), border = TR
1103 1103
 		data_scale = data_scale + c(-extend, 0)*(data_scale[2] - data_scale[1])
1104 1104
 		baseline = max(x)
1105 1105
 	} else {
1106
-		if(is.numeric(baseline)) {
1106
+		if(is.numeric(baseline) && is.null(ylim)) {
1107 1107
 			if(baseline == 0 && all(abs(rowSums(x) - 1) < 1e-6)) {
1108 1108
 				data_scale = c(0, 1)
1109 1109
 			} else if(baseline <= min(x)) {