#define MIN_RANKSEP 0.02
/* default margin for paged formats such as PostScript */
-#define DEFAULT_MARGIN 36
+/* #define DEFAULT_MARGIN 36 */
+#define DEFAULT_MARGIN 5
/* default margin for embedded formats such as PNG */
#define DEFAULT_EMBED_MARGIN 5
static void ps_begin_graph(GVC_t * gvc, graph_t * g, box bb, point pb)
{
char *s;
+ point sz;
PB = bb;
+ /* PB (in the case of a single page graph) is the graph bb offset
+ * at PB.LL by the B & L margin width.
+ * The PostScript BoundingBox also needs margin T & R */
+ sz = add_points(PB.LL, PB.UR);
if (onetime) {
if (Show_boxes == NULL)
fprintf(Output_file, "%%%%BoundingBox: %d %d %d %d\n",
- PB.LL.x, PB.LL.y, PB.UR.x, PB.UR.y);
+ 0, 0, sz.x, sz.y);
fprintf(Output_file, "%%%%EndComments\nsave\n");
cat_libfile(Output_file, U_lib, ps_txt);
epsf_define(Output_file);