@@ -139,8 +139,8 @@ def moving_average_convergence(x, nslow=26, nfast=12):
139139ax1 .plot (r .date , rsi , color = fillcolor )
140140ax1 .axhline (70 , color = fillcolor )
141141ax1 .axhline (30 , color = fillcolor )
142- ax1 .fill_between (r .date , rsi , 70 , facecolor = fillcolor , where = (rsi >= 70 ))
143- ax1 .fill_between (r .date , rsi , 30 , facecolor = fillcolor , where = (rsi <= 30 ))
142+ ax1 .fill_between (r .date , rsi , 70 , where = (rsi >= 70 ), facecolor = fillcolor , edgecolor = fillcolor )
143+ ax1 .fill_between (r .date , rsi , 30 , where = (rsi <= 30 ), facecolor = fillcolor , edgecolor = fillcolor )
144144ax1 .text (0.6 , 0.9 , '>70 = overbought' , va = 'top' , transform = ax1 .transAxes , fontsize = textsize )
145145ax1 .text (0.6 , 0.1 , '<30 = oversold' , transform = ax1 .transAxes , fontsize = textsize )
146146ax1 .set_ylim (0 , 100 )
@@ -181,7 +181,7 @@ def moving_average_convergence(x, nslow=26, nfast=12):
181181
182182volume = (r .close * r .volume )/ 1e6 # dollar volume in millions
183183vmax = volume .max ()
184- poly = ax2t .fill_between (r .date , volume , 0 , facecolor = fillcolor , label = 'Volume' )
184+ poly = ax2t .fill_between (r .date , volume , 0 , label = 'Volume' , facecolor = fillcolor , edgecolor = fillcolor )
185185ax2t .set_ylim (0 , 5 * vmax )
186186ax2t .set_yticks ([])
187187
@@ -195,14 +195,14 @@ def moving_average_convergence(x, nslow=26, nfast=12):
195195ema9 = moving_average (macd , nema , type = 'exponential' )
196196ax3 .plot (r .date , macd , color = 'black' , lw = 2 )
197197ax3 .plot (r .date , ema9 , color = 'blue' , lw = 1 )
198- ax3 .fill_between (r .date , macd - ema9 , 0 , facecolor = fillcolor , alpha = 0.5 )
198+ ax3 .fill_between (r .date , macd - ema9 , 0 , alpha = 0.5 , facecolor = fillcolor , edgecolor = fillcolor )
199199
200200
201201ax3 .text (0.025 , 0.95 , 'MACD (%d, %d, %d)' % (nfast , nslow , nema ), va = 'top' ,
202202 transform = ax3 .transAxes , fontsize = textsize )
203203
204204ax3 .set_yticks ([])
205- # turn off tick labels, rorate them , etc
205+ # turn off upper axis tick labels, rotate the lower ones , etc
206206for ax in ax1 , ax2 , ax2t , ax3 :
207207 if ax != ax3 :
208208 for label in ax .get_xticklabels ():
0 commit comments