shoorick: (Default)
[personal profile] shoorick
Что-то я не вижу нормальных методов менять внешний вид графа. Приходится использовать грязный хак, напрямую обращаясь к полям объекта, созданного при генерации графа:
# Dirty hack: direct access
$graph->{'RANK_DIR'} = 1;
$graph->{'NODE_ATTRS'}->{'fontname'} = 'DejaVuSansCondensed';
$graph->{'NODE_ATTRS'}->{'fontsize'} = 8;
$graph->{'EDGE_ATTRS'}->{'color'} = 'grey';
Получаем:
Дерево
Cкрипт (а точнее, GraphViz) может ругаться на отсутствие шрифтов:
Error: Could not find/open font
Чтобы не ругался, ему можно указать путь к шрифтам, например в переменной окружения DOTFONTPATH.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

shoorick: (Default)
shoorick

December 2016

S M T W T F S
    1 23
45678910
11121314151617
18 19 2021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2025 02:00 am
Powered by Dreamwidth Studios