]> granicus.if.org Git - graphviz/commitdiff
remove unused plot_polys
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Mar 2021 02:17:14 +0000 (19:17 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 29 Mar 2021 02:04:22 +0000 (19:04 -0700)
cmd/gvmap/make_map.c
cmd/gvmap/make_map.h

index 61466ec82dde89a5d85c1a3e0a89de5c9ab2d548..4c722470c9799ae6b2b99c89e9a7b784126b91a6 100644 (file)
@@ -237,49 +237,6 @@ static SparseMatrix matrix_add_entry(SparseMatrix A, int i, int j, int val){
   return SparseMatrix_coordinate_form_add_entries(A, 1, &i1, &j1, &val);
 }
 
-
-
-void plot_polys(int use_line, SparseMatrix polys, real *x_poly, int *polys_groups, float *r, float *g, float *b){
-  int i, j, *ia = polys->ia, *ja = polys->ja, *a = (int*) polys->a, npolys = polys->m, nverts = polys->n, ipoly = -1, max_grp,
-    min_grp;
-
-
-  min_grp = max_grp = polys_groups[0];
-  for (i = 0; i < npolys; i++) {
-    max_grp = MAX(polys_groups[i], max_grp);
-    min_grp = MIN(polys_groups[i], min_grp);
-  }
-  if (max_grp == min_grp) max_grp++;
-  if (Verbose) fprintf(stderr,"npolys = %d\n",npolys);
-  printf("Graphics[{");
-  for (i = 0; i < npolys; i++){
-    for (j = ia[i]; j < ia[i+1]; j++){
-      assert(ja[j] < nverts && ja[j] >= 0);
-      if (a[j] != ipoly){/* the first poly, or a hole */
-       ipoly = a[j];
-       if (ipoly != a[0]) printf("}],");
-       if (use_line){
-         printf("Black,");
-         printf("Line[{");
-       } else {
-         /*printf("Hue[%f],",0.6*(polys_groups[i]/(real) (max_grp-min_grp)));*/
-         if (r && g && b){
-           printf("RGBColor[%f,%f,%f],",r[polys_groups[i]], g[polys_groups[i]], b[polys_groups[i]]);
-         } else {
-           printf("Hue[%f],",(polys_groups[i]-min_grp)/(real) max_grp-min_grp);
-         }
-         printf("Polygon[{");
-       }
-
-      } else {
-       if (j > ia[i]) printf(",");
-      }
-      printf("{%f,%f}",x_poly[2*ja[j]],x_poly[2*ja[j]+1]);
-    }
-  }
-  printf("}]}]");
-}
-
 static void plot_dot_edges(FILE *f, SparseMatrix A){
   int i, *ia, *ja, j;
 
index adcb2fe2595dce159c6c8de062debd5bda1e9ff4..b0cd0643408eab44fecaae89516bad67b32b27b1 100644 (file)
@@ -22,8 +22,6 @@ int make_map_from_rectangle_groups(int exclude_random, int include_OK_points, in
 
 void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_map, real *x, SparseMatrix graph);
 
-
-void plot_polys(int use_line, SparseMatrix polys, real *x_poly, int *polys_groups, float *r, float *g, float *b);
 void plot_points(int n, int dim, real *x);
 void plot_edges(int n, int dim, real *x, SparseMatrix A);
 void plot_labels(int n, int dim, real *x, char **labels);