Skip to content

Commit

Permalink
fix y_on_right==None case (issue matplotlib#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGoldfarb committed Jun 25, 2020
1 parent ba3333a commit a0cefdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mplfinance/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version_info = (0, 12, 6, 'alpha', 0)
version_info = (0, 12, 6, 'alpha', 1)

_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}

Expand Down
4 changes: 1 addition & 3 deletions src/mplfinance/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,13 +719,11 @@ def _set_ylabels_side(ax_pri,ax_sec,primary_on_right):
ax_pri.yaxis.tick_right()
ax_sec.yaxis.set_label_position('left')
ax_sec.yaxis.tick_left()
elif primary_on_right == False:
else: # treat non-True as False, whether False, None, or anything else.
ax_pri.yaxis.set_label_position('left')
ax_pri.yaxis.tick_left()
ax_sec.yaxis.set_label_position('right')
ax_sec.yaxis.tick_right()
else:
raise ValueError('primary_on_right must be `True` or `False`')

def _plot_mav(ax,config,xdates,prices,apmav=None,apwidth=None):
style = config['style']
Expand Down

0 comments on commit a0cefdc

Please sign in to comment.