Skip to content

Commit

Permalink
fixed bug in style_glyphs_below
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkinney committed May 1, 2019
1 parent 1e9d860 commit ada562d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Binary file modified logomaker/examples/figure_logos.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions logomaker/examples/logos_for_figure.ipynb

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions logomaker/src/Logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def style_glyphs_below(self,
alpha=None,
shade=0.0,
fade=0.0,
flip=True,
flip=None,
draw_now=True,
ax=None,
**kwargs):
Expand Down Expand Up @@ -616,17 +616,19 @@ def style_glyphs_below(self,

# modify color
if color is None:
color = get_rgb(g.color)
this_color = get_rgb(g.color)
else:
color = get_rgb(color)
this_color = color

# modify alpha
if alpha is None:
alpha = g.alpha
this_alpha = g.alpha
else:
this_alpha = alpha

# set glyph attributes
g.set_attributes(color=color*(1.0 - shade),
alpha=alpha*(1.0 - fade),
g.set_attributes(color=this_color*(1.0 - shade),
alpha=this_alpha*(1.0 - fade),
flip=flip,
**kwargs)

Expand Down

0 comments on commit ada562d

Please sign in to comment.