Skip to content

Commit

Permalink
highlight_color to default back on call color even if using cycler
Browse files Browse the repository at this point in the history
so if neither color or highlight_color is provided, the highlight_color will match the same color used for the line, which will be provided by the cycler.  Previously, we made two separate calls to the cycler.
  • Loading branch information
kecnry committed Sep 14, 2018
1 parent 638604d commit b73de9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autofig/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ def highlight_marker(self, highlight_marker):

@property
def highlight_color(self):
if self._highlight_color is None:
return self.get_color()
# if self._highlight_color is None:
# return self.get_color()

return self._highlight_color

Expand Down Expand Up @@ -922,7 +922,7 @@ def sc_kwargs_loop(sc_kwargs, loop, do_zorder):
if linefunc is not None:
artist = getattr(ax, linefunc)(i,
ls=self.highlight_linestyle,
color=self.highlight_color)
color=self.highlight_color if self.highlight_color is not None else color)

artist._af_highlight = True
return_artists += [artist]
Expand All @@ -941,7 +941,7 @@ def sc_kwargs_loop(sc_kwargs, loop, do_zorder):
artists = ax.plot(*highlight_data,
marker=self.highlight_marker,
ls=self.highlight_linestyle,
color=self.highlight_color)
color=self.highlight_color if self.highlight_color is not None else color)

for artist in artists:
artist._af_highlight=True
Expand Down

0 comments on commit b73de9a

Please sign in to comment.