modif chdtxt, a tester, problemes sur double sur rst
[iramuteq] / Rscripts / afc_graph.R
index ffca92a..8a62d8a 100644 (file)
@@ -31,6 +31,7 @@ tchi <- %s
 tchi.min <- %i
 tchi.max <- %i
 dirout <- '%s'
+do.svg <- %s
 xminmax <- NULL
 yminmax <- NULL
 
@@ -131,7 +132,11 @@ if ( qui == 3 ) {
     infp <-  which(is.infinite(maxchi) & maxchi > 0)
     if (length(infp)) {
         maxchi[infp] <- NA
-        valmax <- max(maxchi, na.rm = TRUE)
+        if (!length(infp) == length(maxchi)) {
+            valmax <- max(maxchi, na.rm = TRUE)
+        } else {
+            valmax <- 8
+        }
         maxchi[infp] <- valmax + 2
     } 
     if (cex.txt) {
@@ -156,7 +161,7 @@ if (is.null(xminmax)) {
 
 if (typegraph == 0) {
 
-    open_file_graph(fileout, width = width, height = height)
+    open_file_graph(fileout, width = width, height = height, svg = do.svg)
     parcex <- taillecar/10
     par(cex = parcex)
     if (over) {