How can I hide the node boundary in graphviz?
Asked Answered
B

3

9

I am drawing a graph with graphviz. Even though I have penwidth=0 for the nodes, I still see the node boundary. How do I get rid of the node boundary?

My annotation in dot is something like this:

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style=filled,
        shape=octagon,
        penwidht=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
Bower answered 5/5, 2011 at 21:18 Comment(0)
P
15

This works for me:

node [shape=plaintext]

Source: https://renenyffenegger.ch/notes/tools/Graphviz/examples/index

Pudens answered 6/9, 2018 at 18:33 Comment(1)
this doesn't work if you want to use a shape like circleFabriane
G
6

The issue is you have a typo.

penwidht should be penwidth

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style=filled,
        shape=octagon,
        penwidth=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
Gazehound answered 12/6, 2019 at 10:21 Comment(0)
A
3

setlinewidth works for me:

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style="filled,setlinewidth(0)",
        shape=octagon,
    penwidht=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
Ascidium answered 5/5, 2011 at 22:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.