cloud/commit
Font scaling and use bold-fonts
author | Jan Wielemaker |
---|---|
Mon Oct 10 12:44:06 2011 +0200 | |
committer | Jan Wielemaker |
Mon Oct 10 12:44:06 2011 +0200 | |
commit | eb1eb280e1c66852d6698d94d6230f12521a9fb9 |
tree | 913bdbd03ecf736b93e00b6a4077c95055d1c370 |
parent | 6f4df67af12435483b7cf9b8ad67196015ea2a77 |
Diff style: patch stat
diff --git a/lib/datacloud.pl b/lib/datacloud.pl index 16d0603..9b7a7e5 100644 --- a/lib/datacloud.pl +++ b/lib/datacloud.pl @@ -79,9 +79,12 @@ make_dot(Out, CNSizeList,Links):- dot_node(Out, cn(Short,Title,Triples,Size,_LOG)):- write_id(Out, Short), format(atom(ToolTip), '~w (~D triples)', [Title,Triples]), + FontSize is 10+8*Size, write_attributes([ height(Size), width(Size), - tooltip(ToolTip) + tooltip(ToolTip), + fontname('Helvetica-Bold'), + fontsize(FontSize) ], Out), format(Out, ';~n', []). @@ -149,8 +152,8 @@ clean_links:- % of a node size are given in the options through max_size/1 and % min_size/1. get_sizes(CNList,CNSizeList,Options):- - option(max_size(MaxSize),Options, 5), - option(min_size(MinSize),Options, 1), + option(max_size(MaxSize),Options, 3), + option(min_size(MinSize),Options, 0.5), get_max_triples(CNList,MaxTriples), SizeFactor is sqrt(MaxTriples)/(MaxSize-MinSize), @@ -295,6 +298,8 @@ string_attribute('URL'(_)). string_attribute(fillcolor(_)). string_attribute(style(_)). string_attribute(tooltip(_)). +string_attribute(fontname(_)). +string_attribute(fontnames(_)). string_attribute(edgetooltip(_)). html_attribute(html(_), label).