[GRASS-SVN] r36159 - grass/branches/develbranch_6/imagery/i.pca

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 1 06:50:49 EST 2009


Author: hamish
Date: 2009-03-01 06:50:49 -0500 (Sun, 01 Mar 2009)
New Revision: 36159

Modified:
   grass/branches/develbranch_6/imagery/i.pca/support.c
Log:
pretty %f for hist

Modified: grass/branches/develbranch_6/imagery/i.pca/support.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.pca/support.c	2009-03-01 11:26:20 UTC (rev 36158)
+++ grass/branches/develbranch_6/imagery/i.pca/support.c	2009-03-01 11:50:49 UTC (rev 36159)
@@ -49,14 +49,14 @@
     for (i = 0; i < bands; i++) {
 	char tmpeigen[256], tmpa[80];
 
-	sprintf(tmpeigen, "PC%d: %.2f ( ", i+1, eigval[i]);
+	sprintf(tmpeigen, "PC%d %9.2f ( ", i+1, eigval[i]);
 	for (j = 0; j < bands; j++) {
-	    sprintf(tmpa, "%.2f ", eigmat[i][j]);
+	    sprintf(tmpa, "%5.2f ", eigmat[i][j]);
 	    G_strcat(tmpeigen, tmpa);
 	}
 	G_strcat(tmpeigen, ") ");
 	
-	sprintf(tmpa, "[%.2f%%]", eigval[i] * 100/eigval_total);
+	sprintf(tmpa, "[ %5.2f%% ]", eigval[i] * 100/eigval_total);
 	G_strcat(tmpeigen, tmpa);
 
 	sprintf(hist.edhist[i + 1], tmpeigen);



More information about the grass-commit mailing list