Bug #820

Updated by Sebastien Jacquot over 5 years ago

Using "Group bars by lines" preference with more than 7 columns causes an error while generating the specificities chart in R. It seems related to the access to Progression.colors, log:

Can't create specificities chart file (charts engine: {0})org.txm.stat.engine.r.RException: ** R error: "Error in colors[[i]] : subscript out of bounds
while evaluating: op <- par(mar=c(5,5,5,10), xpd=TRUE);
mat <- t(DoubleMatrix9);
draw <- barplot(mat, space=c(1,3), col=colors, horiz=F, las=2, names.arg=Vector10, main="word:[]", beside=T, xpd=TRUE);
W2 <- 100000;
lines(c(0,W2), c(-2.0, -2.0), lty=2);
lines(c(0,W2), c(2.0, 2.0), lty=2);
lines(c(0,W2), c(0,0), lty=1);

for(i in 1:length(draw[1,])){
lines(draw[,i], mat[,i], col=colors[[i]]);
legend("topright", Vector11, inset = c(-0.2,0), col = colors, pch = 0, xpd=TRUE);

This bug may wait a discussion about the colors sets to use in R and JFC charts engine (e.g. the colors set will be stored outside of the Progression class and shares by all the charts engine implementations). class).