use AllEdges if there are no edges.
node_t *n;
edge_t *e;
int nedges = 0;
- attrsym_t *E_pos = agfindedgeattr(g, "pos");
+ attrsym_t *E_pos;
+ if (agnedges(g)) == 0)
+ return AllEdges;
+
+ E_pos = agfindedgeattr(g, "pos");
if (!E_pos || (Nop < 2))
return NoEdges;
nop_init_graphs(g, G_lp, G_bb);
posEdges = nop_init_edges(g);
- if (GD_drawing(g)->xdots)
+ if (GD_drawing(g)->xdots) {
haveBackground = 1;
+ GD_drawing(g)->ratio_kind = R_NONE; /* Turn off any aspect change if background present */
+ }
else
haveBackground = 0;