}
-void plot_edges(int n, int dim, real *x, SparseMatrix A){
- int i, j, k;
- int *ia, *ja;
-
- if (!A) {
- printf("Graphics[{}]");
- return;
- }
- ia = A->ia; ja = A->ja;
-
- printf("Graphics[(* edges of the graph*){");
- for (i = 0; i < n; i++){
- for (j = ia[i]; j < ia[i+1]; j++){
- if (i > 0 && j == ia[i]) printf(",");;
- printf("Line[{{");
- for (k = 0; k < 2; k++) {
- printf("%f",x[i*dim+k]);
- if (k == 0) printf(",");
- }
- printf("},{");
- for (k = 0; k < 2; k++) {
- printf("%f",x[ja[j]*dim+k]);
- if (k == 0) printf(",");
- }
- printf("}}]");
- if (j < ia[i+1] - 1) printf(",");
- }
- }
- printf("}(* end of edges of the graph*)]");
-
-}
static SparseMatrix get_country_graph(int n, SparseMatrix A, int *groups, int GRP_RANDOM, int GRP_BBOX){
/* form a graph each vertex is a group (a country), and a vertex is connected to another if the two countryes shares borders.
since the group ID may not be contigous (e.g., only groups 2,3,5, -1), we will return NULL if one of the group has non-positive ID! */
void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_map, real *x, SparseMatrix graph);
-void plot_edges(int n, int dim, real *x, SparseMatrix A);
void plot_labels(int n, int dim, real *x, char **labels);
void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, SparseMatrix poly_lines, real line_width, char *line_color, real *x_poly, int *polys_groups, char **labels, float *fsz, float *r, float *g, float *b, char* opacity, SparseMatrix A, FILE*);