开发者

How do you center a title for a diagram output to SVG using dot?

开发者 https://www.devze.com 2023-03-15 07:25 出处:网络
So far I tried this line but dot keeps pushing it aside making room for my nodes (pushes it to the right):

So far I tried this line but dot keeps pushing it aside making room for my nodes (pushes it to the right):

_diagram_info [shape="plaintext", label="My Diagram\l", fontsize=13]

Is there a wa开发者_高级运维y to center the label by pos, using dot?


That's how I'd add a title for a graph:

digraph {
    // nodes, edges, subgraphs 
    ...
    // title
    labelloc="t";
    label="My Diagram";
}

This will add a centered title to the top of the graph.

The same syntax can also be used for subgraphs.

0

精彩评论

暂无评论...
验证码 换一张
取 消