[prev in list] [next in list] [prev in thread] [next in thread]
List: graphviz-interest
Subject: Re: [graphviz-interest] Grouping Styles (ala CSS?)
From: "J. Bobby Lopez" <jbl () jbldata ! com>
Date: 2009-02-10 20:49:53
Message-ID: cda3eb110902101249x776a031cw168f9d5a15b2073d () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
This M4 macro solution works great, thanks Marc!
On Tue, Feb 10, 2009 at 2:45 PM, Marc Chantreux <khatar@phear.org> wrote:
> hello,
>
> On Tue, Feb 10, 2009 at 02:17:23PM -0500, J. Bobby Lopez wrote:
> > A better example would be the following:
> > -------- Snippet # 1
> > graph "people"
> > {
> > label = "Two People"
> >
> > subgraph "joe"
> > {
> > "clothes:shoes" [color=Blue, fontcolor=Red]
> > "clothes:gloves" [color=Blue, fontcolor=Red]
> > "body:hair" [color=Green, fontcolor=Brown]
> > "body:eyes" [color=Green, fontcolor=Brown]
> > }
> >
> > subgraph "mary"
> > {
> > "clothes:shoes" [color=Blue, fontcolor=Red]
> > "clothes:gloves" [color=Blue, fontcolor=Red]
> > "body:hair" [color=Green, fontcolor=Brown]
> > "body:eyes" [color=Green, fontcolor=Brown]
> > }
> >
> > }
>
> i personnaly use M4 macros for that. I also write some scripts as
> wrapper. You can see a complete exemple here:
>
> http://oss.phear.org/merisedot/
>
> or the M4 rewrite of your script below.
>
> Regards
> mc
>
> define(CLOTHES,"clothes:$1" [color=Blue`,' fontcolor=Red])dnl
> define(BODY,"body:$1" [color=Blue`,' fontcolor=Red])dnl
>
> graph "people"
> {
> label = "Two People"
>
> subgraph "joe"
> {
> CLOTHES(shoes)
> CLOTHES(gloves)
> BODY(hair)
> BODY(eyes)
> }
>
> subgraph "mary"
> {
> CLOTHES(shoes)
> CLOTHES(gloves)
> BODY(hair)
> BODY(eyes)
> }
>
> }
>
>
>
> _______________________________________________
> graphviz-interest@research.att.com
> https://mailman.research.att.com/mailman/listinfo/graphviz-interest
>
--
J. Bobby Lopez
Web: http://jbldata.com/
Twitter: http://www.twitter.com/jbobbylopez
[Attachment #5 (text/html)]
This M4 macro solution works great, thanks Marc!<br><br><div class="gmail_quote">On \
Tue, Feb 10, 2009 at 2:45 PM, Marc Chantreux <span dir="ltr"><<a \
href="mailto:khatar@phear.org">khatar@phear.org</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;">hello,<br> <div class="Ih2E3d"><br>
On Tue, Feb 10, 2009 at 02:17:23PM -0500, J. Bobby Lopez wrote:<br>
> A better example would be the following:<br>
> -------- Snippet # 1<br>
> graph "people"<br>
> {<br>
> label = "Two People"<br>
><br>
> subgraph "joe"<br>
> {<br>
> "clothes:shoes" [color=Blue, \
fontcolor=Red]<br> > "clothes:gloves" \
[color=Blue, fontcolor=Red]<br> > \
"body:hair" [color=Green, fontcolor=Brown]<br> > \
"body:eyes" [color=Green, fontcolor=Brown]<br> > \
}<br> ><br>
> subgraph "mary"<br>
> {<br>
> "clothes:shoes" [color=Blue, \
fontcolor=Red]<br> > "clothes:gloves" \
[color=Blue, fontcolor=Red]<br> > \
"body:hair" [color=Green, fontcolor=Brown]<br> > \
"body:eyes" [color=Green, fontcolor=Brown]<br> > \
}<br> ><br>
> }<br>
<br>
</div>i personnaly use M4 macros for that. I also write some scripts as<br>
wrapper. You can see a complete exemple here:<br>
<br>
<a href="http://oss.phear.org/merisedot/" \
target="_blank">http://oss.phear.org/merisedot/</a><br> <br>
or the M4 rewrite of your script below.<br>
<br>
Regards<br>
mc<br>
<br>
define(CLOTHES,"clothes:$1" [color=Blue`,' fontcolor=Red])dnl<br>
define(BODY,"body:$1" [color=Blue`,' fontcolor=Red])dnl<br>
<div class="Ih2E3d"><br>
graph "people"<br>
{<br>
label = "Two People"<br>
<br>
subgraph "joe"<br>
{<br>
</div> CLOTHES(shoes)<br>
CLOTHES(gloves)<br>
BODY(hair)<br>
BODY(eyes)<br>
}<br>
<br>
subgraph "mary"<br>
{<br>
CLOTHES(shoes)<br>
CLOTHES(gloves)<br>
BODY(hair)<br>
BODY(eyes)<br>
<div><div></div><div class="Wj3C7c"> }<br>
<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:graphviz-interest@research.att.com">graphviz-interest@research.att.com</a><br>
<a href="https://mailman.research.att.com/mailman/listinfo/graphviz-interest" \
target="_blank">https://mailman.research.att.com/mailman/listinfo/graphviz-interest</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>J. Bobby Lopez<br>Web: \
<a href="http://jbldata.com/">http://jbldata.com/</a><br>Twitter: <a \
href="http://www.twitter.com/jbobbylopez">http://www.twitter.com/jbobbylopez</a><br> \
<br>
_______________________________________________
graphviz-interest@research.att.com
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic