Discussion:
[graphviz-interest] dot -> fig -> pic = annoying border line, how to remove?
Anton Shterenlikht
2015-11-03 13:04:43 UTC
Permalink
HI

I've been using gv for a long time,
so I'm familiar with the basics.
I now have a minor but annoying problem
that I cannot figure out.

$ cat lnklst2.gv
//$Id: lnklst2.gv 160 2015-11-03 11:42:23Z mexas $

digraph "" {
bgcolor = transparent;
label = "lnklst2.gv";
fontsize = 10;

node [ shape = Mrecord ];
node1 [ label = "<f1> value | <f2> next" ];
null [ shape="circle", label="NULL" ];
node1:f2 -> null;
}
$

I process this file as:

dot -Tfig -o lnklst2.fig lnklst2.gv
fig2dev -Lpic -pall lnklst2.fig lnklst2.pic

And it gives me a bounding line which I do not want:

http://eis.bris.ac.uk/~mexas/z.pdf

The source of the problem seems to be that
the graph background is set to white even
though I set it to transparent.
You can see this here, where I open lnklst2.fig
file with Xfig:

Loading Image...

Can anybody reproduce this behaviour?
Have I messed up the settings?
Or does this look like an unexpected behaviour.

I tried to convert gv -> pic directly, but
I get errors on the groff side which I haven't figured out yet.

Many thanks

Anton
_______________________________________________
graphviz-***@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/graphviz-interest
Anton Shterenlikht
2015-11-03 15:18:53 UTC
Permalink
Content-Transfer-Encoding: 7bit
Anton,
As I recall, .fig doesn't (or didn't) have a way to represent
transparency. If it does now then this would be a reasonable
enhancement for graphviz.
John, thank you.

I'm not sure whether .fig are transparent or not.

However, I did some more digging.
It seems the .fig files created by
graphviz have white rectangles the
size of the whole image.
I can manually remove this rectangle
in Xfig and then I no longer have the bounding
line problem.

If I set
bgcolor = blue
or another non-while colour, I get a filled rectangle
of the same colour in .fig.

I'm not sure it's the same as transparency issue,
perhaps not.
work:~$ dot -Tpic test.gv | gpic
.lf 1 -
.\" Creator: graphviz version 2.39.20150720.1238 (20150720.1238)
.\" save point size and font
.nr .S \n(.s
.nr DF \n(.f
.lf 6
gpic:<standard input>:12: width specified for picture with zero width
gpic:<standard input>:12: height specified for picture with zero height
.PS 0.000i 0.000i 1.50000 2.34722
.\" 0 0 0 0
.\" 0.000i 0.000i 0.000i 0.000i
.nr 00 \n(.u
.nf
.nr 0x 1
\h'0.000i'
.sp -1
.lf 7
.\" to change drawing size, multiply the width and height on the .PS
line above and the number on the two lines below (rounded to the nearest
integer) by a scale factor
.lf 8
.nr SF 1500
.lf 10
.\" don't change anything below this line in this drawing
.lf 11
.\" non-fatal run-time pic version determination, version 2
\D't -1.000p'\h'1.000p'
.sp -1
.sp 0.000i+1
.if \n(00 .fi
.br
.nr 0x 0
.lf 12
.PE
gpic:<standard input>:12: syntax error before `.'
gpic:<standard input>:12: giving up on this picture
.lf 74
.\" restore point size and font
.ps \n(.S
.ft \n(DF
Is that what you see? I don't know pic well enough to tell you what is
going wrong here...
Yes, these are the errors I see.
I also don't know what's wrong.
Is pic essential for what you are trying to do? Or could you use pdf,
or svg, or eps?
yes, kind of essential.
It's a large groff document with hundreds of pic files,
some are originally from graphviz, others are
created manually in Xfig.

Many thanks

Anton
_______________________________________________
graphviz-***@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/graphviz-interest

Loading...