Re: [graphviz-interest] graphviz-interest Digest, Vol 136, Issue 2
steve roush <[email protected]> Tue, 3 Nov 2015 23:42:42 -0700
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============5534422339259891216==
Content-Type: multipart/alternative;
boundary="------------000200070602050400030507"
This is a multi-part message in MIME format.
--------------000200070602050400030507
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
I will do what I can to help anyone who is inspired enough to use PIC, so here
is a gawk script that may fix all(?) your FIG files. It looks for the first
polygon of the file ("2 3 ...") and comments it out (the polygone command will
be 2 or more lines). I don't know why the FIG output begins with a
bounding-box polygon, but if there is only one bounding-box, this should remove it.
I hope this helps.
gawk 'BEGIN{fixed=0;fixing=0}fixing==1{if ($0~/^ /)$0="# " $0;else
{fixed=1;fixing=0}}fixed==0 && /^2 3 /{$0="# remove surround "
$0;fixing=1}{print}' lnklst2.fig
steve roush
p.s. FIG format is documented here http://xfig.org/userman/frm_miscellaneous.html
On 11/3/2015 10:00 AM, [email protected] wrote:
> Subject:
> [graphviz-interest] dot -> fig -> pic = annoying border line, how to remove?
> From:
> Anton Shterenlikht <[email protected]>
> Date:
> 11/3/2015 6:04 AM
>
> To:
> [email protected]
>
>
> 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:
>
> http://eis.bris.ac.uk/~mexas/lnklst2-xfig.png
>
> 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
>
--------------000200070602050400030507
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dwindows-1252"
http-equiv=3D"Content-Type">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<br>
I will do what I can to help anyone who is inspired enough to use
PIC, so here is a gawk script that may fix all(?) your FIG files.=A0
It looks for the first polygon of the file ("2 3 ...") and comments
it out (the polygone command will be 2 or more lines).=A0=A0=A0 I don=
't
know why the FIG output begins with a bounding-box polygon,=A0 but if
there is only one bounding-box, this should remove it.<br>
=A0I hope this helps.<br>
<br>
gawk 'BEGIN{fixed=3D0;fixing=3D0}fixing=3D=3D1{if ($0~/^ /)$0=3D"#=A0=
" $0;else
{fixed=3D1;fixing=3D0}}fixed=3D=3D0 && /^2 3 /{$0=3D"# remove=
surround
" $0;fixing=3D1}{print}' lnklst2.fig<br>
<br>
steve roush<br>
<br>
p.s. FIG format is documented here
<a class=3D"moz-txt-link-freetext" href=3D"http://xfig.org/userman/fr=
m_miscellaneous.html">http://xfig.org/userman/frm_miscellaneous.html</a><=
br>
<br>
<div class=3D"moz-cite-prefix">On 11/3/2015 10:00 AM,
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:graphviz-inter=
[email protected]">[email protected]=
rch.att.com</a> wrote:<br>
</div>
<blockquote
cite=3D"mid:[email protected]=
tt.com"
type=3D"cite">
<table class=3D"header-part1" border=3D"0" cellpadding=3D"0"
cellspacing=3D"0" width=3D"100%">
<tbody>
<tr>
<td>
<div class=3D"headerdisplayname" style=3D"display:inline;">=
Subject:
</div>
[graphviz-interest] dot -> fig -> pic =3D annoying
border line, how to remove?</td>
</tr>
<tr>
<td>
<div class=3D"headerdisplayname" style=3D"display:inline;">=
From:
</div>
Anton Shterenlikht <a class=3D"moz-txt-link-rfc2396E" href=3D=
"mailto:[email protected]"><[email protected]></a></td>
</tr>
<tr>
<td>
<div class=3D"headerdisplayname" style=3D"display:inline;">=
Date:
</div>
11/3/2015 6:04 AM</td>
</tr>
</tbody>
</table>
<table class=3D"header-part2" border=3D"0" cellpadding=3D"0"
cellspacing=3D"0" width=3D"100%">
<tbody>
<tr>
<td>
<div class=3D"headerdisplayname" style=3D"display:inline;">=
To:
</div>
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:graphv=
[email protected]">[email protected].=
com</a></td>
</tr>
</tbody>
</table>
<br>
<div class=3D"moz-text-plain" wrap=3D"true" graphical-quote=3D"true=
"
style=3D"font-family: -moz-fixed; font-size: 14px;"
lang=3D"x-western">
<pre wrap=3D"">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 =3D transparent;
label =3D "lnklst2.gv";
fontsize =3D 10;
node [ shape =3D Mrecord ];
node1 [ label =3D "<f1> value | <f2> next" ];
null [ shape=3D"circle", label=3D"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:
<a class=3D"moz-txt-link-freetext" href=3D"http://eis.bris.ac.uk/%7Emexas=
/z.pdf">http://eis.bris.ac.uk/~mexas/z.pdf</a>
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:
<a class=3D"moz-txt-link-freetext" href=3D"http://eis.bris.ac.uk/%7Emexas=
/lnklst2-xfig.png">http://eis.bris.ac.uk/~mexas/lnklst2-xfig.png</a>
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
</pre>
</div>
<pre wrap=3D"">
</pre>
</blockquote>
<br>
</body>
</html>
--------------000200070602050400030507--
--===============5534422339259891216==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest
--===============5534422339259891216==--