From 2dd07e0e7611fa429ee0689e07cc932dc392941a Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 22 Jun 2017 01:57:19 -0500 Subject: [PATCH] draw_annotation: Respect color argument passed by user. --- sumpy/toys.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sumpy/toys.py b/sumpy/toys.py index 9262782a..8caa657c 100644 --- a/sumpy/toys.py +++ b/sumpy/toys.py @@ -510,11 +510,17 @@ def draw_arrow(from_pt, to_pt, shorten=0, **kwargs): def draw_annotation(from_pt, to_pt, label, **kwargs): import matplotlib.pyplot as plt + color = kwargs.setdefault("color", "white") + + arrowprops = dict( + facecolor=color, + edgecolor=color, + shrink=0.05, + width=1, + headwidth=5) plt.gca().annotate(label, xy=from_pt, xytext=to_pt, - arrowprops=dict( - facecolor="white", edgecolor="white", shrink=0.05, - width=1, headwidth=5), color="white", **kwargs) + arrowprops=arrowprops, **kwargs) class SchematicVisitor(object): -- GitLab