[GRASS-SVN] r32737 - grass/trunk/display/d.thematic.area

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 13 05:13:41 EDT 2008


Author: mlennert
Date: 2008-08-13 05:13:40 -0400 (Wed, 13 Aug 2008)
New Revision: 32737

Modified:
   grass/trunk/display/d.thematic.area/main.c
Log:
slight improvements of the d.graph legend instruction file


Modified: grass/trunk/display/d.thematic.area/main.c
===================================================================
--- grass/trunk/display/d.thematic.area/main.c	2008-08-13 08:24:19 UTC (rev 32736)
+++ grass/trunk/display/d.thematic.area/main.c	2008-08-13 09:13:40 UTC (rev 32737)
@@ -499,28 +499,28 @@
 
     if (legend_file_opt->answer) {
 	fd = fopen(legend_file_opt->answer, "w");
-	boxsize = 100 / nclass;
+	boxsize = 25;
 	textsize = boxsize / 10;
 	fprintf(fd, "size %i %i\n", textsize, textsize);
 	ypos = 10;
 	fprintf(fd, "symbol basic/box %i 5 %i black %d:%d:%d\n", boxsize,
 		ypos, colors[0].r, colors[0].g, colors[0].b);
-	fprintf(fd, "move 15 %i \n", ypos - textsize / 2);
+	fprintf(fd, "move 8 %f \n", ypos - textsize / 2.5);
 	fprintf(fd, "text %f - %f | %i\n", min, breakpoints[0],
 		frequencies[0]);
 	for (i = 1; i < nbreaks; i++) {
-	    ypos = 10 + i * 10;
+	    ypos = 10 + i * 6;
 	    fprintf(fd, "symbol basic/box %i 5 %i black %d:%d:%d\n", boxsize,
 		    ypos, colors[i].r, colors[i].g, colors[i].b);
-	    fprintf(fd, "move 15 %i\n", ypos - textsize / 2);
+	    fprintf(fd, "move 8 %f\n", ypos - textsize / 2.5);
 	    fprintf(fd, "text %f - %f | %i\n", breakpoints[i - 1],
 		    breakpoints[i], frequencies[i]);
 	}
-	ypos = 10 + i * 10;
+	ypos = 10 + i * 6;
 	fprintf(fd, "symbol basic/box %i 5 %i black %d:%d:%d\n", boxsize,
 		ypos, colors[nbreaks].r, colors[nbreaks].g,
 		colors[nbreaks].b);
-	fprintf(fd, "move 15 %i\n", ypos - textsize / 2);
+	fprintf(fd, "move 8 %f\n", ypos - textsize / 2.5);
 	fprintf(fd, "text %f - %f | %i\n", breakpoints[nbreaks - 1], max,
 		frequencies[nbreaks]);
 	fclose(fd);



More information about the grass-commit mailing list