From 04fbd903a3d9bdff3da67b3d141a5773b5e05c0b Mon Sep 17 00:00:00 2001
From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Tue, 16 Mar 2021 19:17:14 -0700
Subject: [PATCH] remove unused plot_polys

---
 cmd/gvmap/make_map.c | 43 -------------------------------------------
 cmd/gvmap/make_map.h |  2 --
 2 files changed, 45 deletions(-)

diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c
index 61466ec82..4c722470c 100644
--- a/cmd/gvmap/make_map.c
+++ b/cmd/gvmap/make_map.c
@@ -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;
 
diff --git a/cmd/gvmap/make_map.h b/cmd/gvmap/make_map.h
index adcb2fe25..b0cd06434 100644
--- a/cmd/gvmap/make_map.h
+++ b/cmd/gvmap/make_map.h
@@ -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);
-- 
2.40.0