From 82f2551ab1a10175feb06008550d4487f1ff898a Mon Sep 17 00:00:00 2001 From: tractorjuice <129532814+tractorjuice@users.noreply.github.com> Date: Mon, 22 May 2023 13:05:31 +0100 Subject: [PATCH] Update wardley.py Add the red evolve nodes to the map. --- ipywardley/wardley.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ipywardley/wardley.py b/ipywardley/wardley.py index 385aec5..49c3177 100644 --- a/ipywardley/wardley.py +++ b/ipywardley/wardley.py @@ -244,6 +244,16 @@ def generate_wardley_plot(self, ax, wm): xy=(n['mat'], n['vis']), xycoords='data', xytext=(n['label_x'], n['label_y']), textcoords='offset pixels', horizontalalignment='left', verticalalignment='bottom') + + # Add the evolve nodes: + for evolve_title, evolve in wm.evolves.items(): + n = wm.nodes[evolve_title] + plt.plot(evolve['mat'], n['vis'], marker='o', color=matplotlib.rcParams['axes.facecolor'], markeredgecolor='red', markersize=3) + + ax.annotate(evolve_title, fontsize=5, fontfamily=matplotlib.rcParams['font.family'], + xy=(evolve['mat'], n['vis']), xycoords='data', + xytext=(n['label_x'], n['label_y']), textcoords='offset pixels', + horizontalalignment='left', verticalalignment='bottom') # Add the notes: for note in wm.notes: