This is a place for often seen graph layout questions.


- how to set border and background color in dot language
This is a combination of style, color and fillcolor, try this graph to see how it works
/* how to set the bordercolor of a node to green */
digraph "g"
{
 "test1" [style="filled",color=red,fillcolor=green,label="filled\ncolor=red\nfillcolor=green"];
 "test2" [style="filled",fillcolor=red,label="filled\nfillcolor=red"];
 "test3" [style="filled",color=green,label="filled\ncolor=green"];
 "test4" [style="filled",label="filled"];

 /* border color is green, fillcolor is red */
 "test5" [color=green,fillcolor=red,label="color=green\nfillcolor=red"];
 "test6" [fillcolor=red,label="fillcolor=red"];
 "test7" [color=green,label="color=green"];
}

- gml4gtk crashes
This can happen but should not because it is checked much with valgrind and other tools.
With big data the splay_tree_delete() recursion in splay-tree.c can crash and that is being fixed.
The fast way to fix this is to use catchsegv or gdb and use backtrace bt command to see where.
gdb ./gml4gtk
...run until crash...
> bt
See where the crash happened and fix the bug or submit a graph and bugreport

- gml4gtk ignores dot language features
Currently the gml4gtk program tries to parse as much and as correct possible the dot data.
Then only a small part of the data is used in the graph layout code, that is why it is skipped.
The solution is more programming work and every next version of gml4gtk will be better.

- gml4gtk does not parse a dot file
That can be a bug in gml4gtk or gml4gtk does insist on correct dot graph data
when dot skips invalid data. Put yydebug=1; in the dot file to get parse debug info.

- the drawing is too big and dificult to navigate
Then it is possible to use the gui checkboxes to turn node labels off
and turn the popup checkbox on. Then the drawing is small and when
the mouse is at a node a popup window with node label text happens.
The drawing can be dragged holding the left mouse button down.
The dx and dy in the gui can be used to stretch the drawing more or less.

- the drawing of edges lines is not correct or nodes drawing wrong
This is a known problem and will be fixed in next versions because the drawing part is difficult.
And node shapes will be added when the placement+drawing parts are more reliable.

- it is slow with big graph files
The sugiyama layout algorithm checks many different configurations of node positions
of the drawing to continue with the version with lowest edge line crossings.
That needs much time and cannot be fixed because it is a np hard problem.
The gui has options to change barycenter and position modes to try.

- why is node x left to node y
The drawing is created using robotic automatich algorithms which can result in a different
drawing then expected and sometimes the gml4gtk drawing is clearly better then graphviz dot.

- how to get node x left to node y
This is not possible because the drawing is automatic generated and only adding more
constraint commands in the dot language can make such usage possible.
If you really want such way then use a manual editor as the dia diagram program or other.

- how to generate all compiler graph data using gcc 11, clang, Linux sparse or bison compilers
For clang first compile a bytecode file like this:
   clang -c -emit-llvm -I. -I.. dpmem.c -o dpmem.bc
Then use the opt program to generate the graph data:
    opt -dot-cfg-only dpmem.bc
    opt -dot-cfg dpmem.bc
    opt -dot-dom dpmem.bc
    opt -dot-dom-only dpmem.bc
    opt -dot-postdom dpmem.bc
    opt -dot-postdom-only dpmem.bc
    opt -dot-callgraph dpmem.bc

For GCC 11 compiler use these command line options:
CFLAGS = \
    -fanalyzer \
    -fdump-analyzer-callgraph \
    -fdump-analyzer-exploded-graph \
    -fdump-analyzer-supergraph \
    -fdump-analyzer-state-purge \
    -fcallgraph-info=da  \
    -fdump-rtl-all-graph \
    -fdump-tree-all-graph \
    -fdump-ipa-all-graph

And the *.ci file is a vcg file which can be used with gml4gtk using "open vcg"

For Linux kernel sparse compiler look at the graph.c file and a update at
https://myogdf.blogspot.com/2020/12/sparse-graph-output-improved.html
the graph data has more usable information

For bison parser generator use the commandline option --graph=output.gv

For a small C source file this are the resulting graph data files:
ls -sh *.dot *.gv *.ci
4.0K callgraph.dot                          16K dpmem.c.143t.dce4.dot
4.0K dom.dp_calloc.dot                      16K dpmem.c.144t.fix_loops.dot
4.0K dom.dp_free.dot                        16K dpmem.c.177t.no_loop.dot
4.0K dom.dp_malloc.dot                      12K dpmem.c.180t.veclower21.dot
4.0K dom.dp_realloc.dot                     12K dpmem.c.181t.switchlower1.dot
4.0K dom.dp_strdup.dot                      12K dpmem.c.183t.reassoc2.dot
4.0K domonly.dp_calloc.dot                  12K dpmem.c.184t.slsr.dot
4.0K domonly.dp_free.dot                    12K dpmem.c.187t.fre5.dot
4.0K domonly.dp_malloc.dot                  12K dpmem.c.188t.thread3.dot
4.0K domonly.dp_realloc.dot                 12K dpmem.c.189t.dom3.dot
4.0K domonly.dp_strdup.dot                  12K dpmem.c.190t.strlen1.dot
 12K dpmem.c.015t.cfg.dot                   12K dpmem.c.191t.thread4.dot
 12K dpmem.c.017t.ompexp.dot                12K dpmem.c.192t.vrp2.dot
 12K dpmem.c.020i.visibility.dot            12K dpmem.c.193t.copyprop5.dot
 12K dpmem.c.021i.build_ssa_passes.dot      12K dpmem.c.194t.wrestrict.dot
 12K dpmem.c.022t.fixup_cfg1.dot            12K dpmem.c.195t.dse4.dot
 12K dpmem.c.023t.ssa.dot                   12K dpmem.c.196t.cddce3.dot
 12K dpmem.c.025t.nothrow.dot               12K dpmem.c.197t.forwprop4.dot
 12K dpmem.c.026i.opt_local_passes.dot      12K dpmem.c.198t.phiopt4.dot
 12K dpmem.c.027t.fixup_cfg2.dot            12K dpmem.c.199t.fab1.dot
 12K dpmem.c.028t.local-fnsummary1.dot      12K dpmem.c.200t.widening_mul.dot
 12K dpmem.c.029t.einline.dot               12K dpmem.c.201t.store-merging.dot
 12K dpmem.c.030t.early_optimizations.dot   12K dpmem.c.202t.tailc.dot
 12K dpmem.c.031t.objsz1.dot                12K dpmem.c.203t.dce7.dot
 12K dpmem.c.032t.ccp1.dot                  16K dpmem.c.204t.crited1.dot
 12K dpmem.c.033t.forwprop1.dot             16K dpmem.c.205t.uninit1.dot
 12K dpmem.c.034t.ethread.dot               16K dpmem.c.206t.uncprop1.dot
 12K dpmem.c.035t.esra.dot                  16K dpmem.c.207t.local-pure-const2.dot
 12K dpmem.c.036t.ealias.dot                16K dpmem.c.208t.modref2.dot
 12K dpmem.c.037t.fre1.dot                  16K dpmem.c.242t.nrv.dot
 12K dpmem.c.038t.evrp.dot                  16K dpmem.c.243t.isel.dot
 12K dpmem.c.039t.mergephi1.dot             12K dpmem.c.244t.optimized.dot
 12K dpmem.c.040t.dse1.dot                  20K dpmem.c.245r.expand.dot
 12K dpmem.c.041t.cddce1.dot                20K dpmem.c.246r.vregs.dot
 12K dpmem.c.042t.phiopt1.dot               20K dpmem.c.247r.into_cfglayout.dot
 12K dpmem.c.043t.modref1.dot               20K dpmem.c.248r.jump.dot
 12K dpmem.c.044t.tailr1.dot                20K dpmem.c.249r.subreg1.dot
 12K dpmem.c.045t.iftoswitch.dot            20K dpmem.c.250r.dfinit.dot
 12K dpmem.c.046t.switchconv.dot            20K dpmem.c.251r.cse1.dot
 12K dpmem.c.048t.profile_estimate.dot      20K dpmem.c.252r.fwprop1.dot
 12K dpmem.c.049t.local-pure-const1.dot     20K dpmem.c.253r.cprop1.dot
 12K dpmem.c.050t.fnsplit.dot               20K dpmem.c.254r.pre.dot
 12K dpmem.c.051t.release_ssa.dot           20K dpmem.c.256r.cprop2.dot
 12K dpmem.c.052t.local-fnsummary2.dot     4.0K dpmem.c.258r.cse_local.dot
 12K dpmem.c.053i.remove_symbols.dot        20K dpmem.c.259r.ce1.dot
 12K dpmem.c.065i.targetclone.dot           20K dpmem.c.260r.reginfo.dot
 12K dpmem.c.069i.free-fnsummary1.dot       20K dpmem.c.261r.loop2.dot
 12K dpmem.c.073i.analyzer.dot              20K dpmem.c.262r.loop2_init.dot
 12K dpmem.c.075i.whole-program.dot         20K dpmem.c.263r.loop2_invariant.dot
 12K dpmem.c.076i.profile_estimate.dot      20K dpmem.c.266r.loop2_done.dot
 12K dpmem.c.077i.icf.dot                   20K dpmem.c.269r.cprop3.dot
 12K dpmem.c.078i.devirt.dot                20K dpmem.c.270r.stv1.dot
 12K dpmem.c.079i.cp.dot                    20K dpmem.c.271r.cse2.dot
 12K dpmem.c.080i.sra.dot                   20K dpmem.c.272r.dse1.dot
 12K dpmem.c.082i.fnsummary.dot             20K dpmem.c.273r.fwprop2.dot
 12K dpmem.c.083i.inline.dot                20K dpmem.c.275r.init-regs.dot
 12K dpmem.c.084i.pure-const.dot            20K dpmem.c.276r.ud_dce.dot
 12K dpmem.c.085i.modref.dot                20K dpmem.c.277r.combine.dot
 12K dpmem.c.086i.free-fnsummary2.dot       20K dpmem.c.280r.stv2.dot
 12K dpmem.c.087i.static-var.dot            20K dpmem.c.281r.ce2.dot
 12K dpmem.c.088i.single-use.dot            20K dpmem.c.282r.jump_after_combine.dot
 12K dpmem.c.089i.comdats.dot               20K dpmem.c.283r.bbpart.dot
 12K dpmem.c.091i.simdclone.dot             20K dpmem.c.284r.outof_cfglayout.dot
 12K dpmem.c.092t.fixup_cfg3.dot            20K dpmem.c.285r.split1.dot
 12K dpmem.c.097t.adjust_alignment.dot      20K dpmem.c.286r.subreg3.dot
 12K dpmem.c.098t.ccp2.dot                  20K dpmem.c.288r.mode_sw.dot
 12K dpmem.c.099t.post_ipa_warn1.dot        20K dpmem.c.289r.asmcons.dot
 12K dpmem.c.100t.cunrolli.dot              20K dpmem.c.294r.ira.dot
 12K dpmem.c.101t.backprop.dot              16K dpmem.c.295r.reload.dot
 12K dpmem.c.102t.phiprop.dot               16K dpmem.c.297r.postreload.dot
 12K dpmem.c.103t.forwprop2.dot             16K dpmem.c.299r.split2.dot
 12K dpmem.c.104t.objsz2.dot                16K dpmem.c.300r.ree.dot
 12K dpmem.c.105t.alias.dot                 16K dpmem.c.301r.cmpelim.dot
 12K dpmem.c.106t.retslot.dot               20K dpmem.c.302r.pro_and_epilogue.dot
 12K dpmem.c.107t.fre3.dot                  20K dpmem.c.303r.dse2.dot
 12K dpmem.c.108t.mergephi2.dot             20K dpmem.c.304r.csa.dot
 12K dpmem.c.109t.thread1.dot               20K dpmem.c.305r.jump2.dot
 12K dpmem.c.110t.vrp1.dot                  20K dpmem.c.306r.compgotos.dot
 12K dpmem.c.111t.dce2.dot                  20K dpmem.c.308r.peephole2.dot
 12K dpmem.c.112t.stdarg.dot                20K dpmem.c.309r.ce3.dot
 12K dpmem.c.113t.cdce.dot                  20K dpmem.c.311r.cprop_hardreg.dot
 12K dpmem.c.114t.cselim.dot                20K dpmem.c.312r.rtl_dce.dot
 12K dpmem.c.115t.copyprop1.dot             20K dpmem.c.313r.bbro.dot
 12K dpmem.c.116t.ifcombine.dot             20K dpmem.c.314r.split3.dot
 12K dpmem.c.117t.mergephi3.dot             20K dpmem.c.315r.sched2.dot
 12K dpmem.c.118t.phiopt2.dot               20K dpmem.c.317r.stack.dot
 12K dpmem.c.119t.tailr2.dot                20K dpmem.c.318r.zero_call_used_regs.dot
 12K dpmem.c.120t.ch2.dot                   20K dpmem.c.319r.alignments.dot
 12K dpmem.c.121t.cplxlower1.dot            24K dpmem.c.320r.vartrack.dot
 12K dpmem.c.122t.sra.dot                  4.0K dpmem.c.callgraph.dot
 12K dpmem.c.123t.thread2.dot              152K dpmem.c.eg.dot
 12K dpmem.c.124t.dom2.dot                 4.0K dpmem.ci
 12K dpmem.c.125t.copyprop2.dot             36K dpmem.c.state-purge.dot
 12K dpmem.c.126t.isolate-paths.dot         20K dpmem.c.supergraph.dot
 12K dpmem.c.127t.dse2.dot                  40K dpmem.c.supergraph-eg.dot
 12K dpmem.c.128t.reassoc1.dot              12K lex.gv
 12K dpmem.c.129t.dce3.dot                 4.0K postdom.dp_calloc.dot
 12K dpmem.c.130t.forwprop3.dot            4.0K postdom.dp_free.dot
 12K dpmem.c.131t.phiopt3.dot              4.0K postdom.dp_malloc.dot
 12K dpmem.c.132t.ccp3.dot                 4.0K postdom.dp_realloc.dot
 12K dpmem.c.133t.sincos.dot               4.0K postdom.dp_strdup.dot
 12K dpmem.c.134t.bswap.dot                4.0K postdomonly.dp_calloc.dot
 12K dpmem.c.135t.laddress.dot             4.0K postdomonly.dp_free.dot
 12K dpmem.c.136t.lim2.dot                 4.0K postdomonly.dp_malloc.dot
 12K dpmem.c.137t.walloca2.dot             4.0K postdomonly.dp_realloc.dot
 16K dpmem.c.138t.pre.dot                  4.0K postdomonly.dp_strdup.dot
 16K dpmem.c.139t.sink.dot


- there is available paid-for support
The problem with free open-source software is there is often no paid-for support possible
which can be required in several situations and that is why it is mentioned here
Also it can be impossible to find a trained Linux C programmer to attempt to do it.
There is paid-for Linux support available from suse or red-hat Linux but that is surely
not usable for highly specialized graph data issues, it is only for Linux system administration.