Skip to content

Commit f776627

Browse files
committed
visualization.py: add legend to html
# Last 3 commits: # d94db75 visualization.py: add legend to html # c695e05 visualization.py: layout for small graphs # 2c5c1c3 visualization.py: decrease fontsize
1 parent c695e05 commit f776627

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/pyirk/templates/node_template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>{{context.title}}</h1>
66
{% if context.desc %}{{context.desc}}{% endif %}
77
<br>
88
<br>
9-
<div><img src="{{context.img_source}}" usemap="#G"></div>
9+
<div><img src="{{context.img_source}}" usemap="#G"><img src="{{context.img_legend_source}}"></div>
1010
{{context.map}}
1111
<br>
1212
<p><a href="index.html">Back to index</a></p>

src/pyirk/visualization.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def get_node_color(node):
578578
"style": "solid",
579579
"arrowType": "normal",
580580
"penwidth": 2,
581-
"minlen": 1,
581+
"minlen": 1, # note: this only applies to dot layout
582582
# label
583583
"label": d["edge"].short_key,
584584
"fontsize": FONTSIZE,
@@ -924,6 +924,7 @@ def create_interactive_graph(self, url_template="", output_dir="graph_site", rad
924924
context = {
925925
"title": node_name + " " + item.R1.value,
926926
"img_source": f"{node_name}.svg",
927+
"img_legend_source": f"{node_name}_legend.svg",
927928
"map": image_map,
928929
"desc": desc
929930
}

0 commit comments

Comments
 (0)