<div dir="ltr">Can you please report that as an issue on github?<div><br></div><div>Tom</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 29, 2018 at 2:20 AM Srinivasa Rao <<a href="mailto:srinivasrao.poladi@gmail.com">srinivasrao.poladi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tom,<br>
<br>
Yes, I have tried 3.0.1. While it has solved my old problems, it has<br>
introduced a new problem, which was not there with 3.0.0!<br>
<br>
Giving below the code followed by error log:<br>
<br>
Inserting the image of expected output that comes when we run the same code<br>
with 3.0.0 or earlier version<br>
<<a href="http://matplotlib.1069221.n5.nabble.com/file/t5188/output300.png" rel="noreferrer" target="_blank">http://matplotlib.1069221.n5.nabble.com/file/t5188/output300.png</a>> :<br>
<br>
----------------------------------------------------------<br>
from mpl_toolkits.axes_grid1 import host_subplot<br>
import mpl_toolkits.axisartist as AA<br>
import matplotlib.pyplot as plt<br>
<br>
plt.figure()<br>
ax1 = host_subplot(111, axes_class=AA.Axes)<br>
<br>
ax1.axis["top"].toggle(all=False)           # switch off ticks and tick<br>
labels for the top axis<br>
<br>
ax2 = ax1.twinx()<br>
ax3 = ax1.twinx()<br>
<br>
new_fixed_axis = ax3.get_grid_helper().new_fixed_axis<br>
ax3.axis["right"] = new_fixed_axis(loc="right",<br>
                                    axes=ax3,<br>
                                    offset=(60, 0))<br>
<br>
ax2.axis["right"].toggle(all=True)<br>
ax3.axis["right"].toggle(all=True)<br>
<br>
ax1.set_xlabel('Defect Reason Codes')<br>
ax1.set_ylabel('Number of Defects')<br>
ax2.set_ylabel('Cumulative Defects as %')<br>
ax3.set_ylabel('Cumulative Defects Count')<br>
<br>
x = [0, 1, 2, 3, 4, 5]<br>
y = [19, 12, 6, 4, 3, 2]<br>
y1 = [41, 67, 80, 89, 96, 100]<br>
y2 = [19, 31, 37, 41, 44, 46]<br>
<br>
b = ax1.bar(x, y, label='Number of Defects')<br>
l, = ax2.plot(x, y1, lw=5, label='Cumulative Defects as %', color='b')<br>
l1, = ax3.plot(x, y2, lw=5, label='Cumulative Defects Count', color='g')<br>
<br>
ax3.set_ylim(15, 50)<br>
<br>
ax1.legend(loc=5)<br>
ax1.set_title('Product Defects - August 2018')<br>
<br>
ax1.axis["left"].label.set_color(b.patches[0].get_facecolor())<br>
ax2.axis["right"].label.set_color(l.get_color())<br>
ax3.axis["right"].label.set_color(l1.get_color())<br>
<br>
ax1.axis["left"].major_ticks.set_color(b.patches[0].get_facecolor())<br>
ax2.axis["right"].major_ticks.set_color(l.get_color())<br>
ax3.axis["right"].major_ticks.set_color(l1.get_color())<br>
<br>
ax1.axis["left"].major_ticklabels.set_color(b.patches[0].get_facecolor())<br>
ax2.axis["right"].major_ticklabels.set_color(l.get_color())<br>
ax3.axis["right"].major_ticklabels.set_color(l1.get_color())<br>
<br>
# setting the color for axis itself is not working in AA<br>
ax2.spines["right"].set_color(l.get_color())   <br>
ax3.spines["right"].set_color(l1.get_color())<br>
<br>
ax1.axis[:].major_ticks.set_tick_out(True)<br>
ax2.axis[:].major_ticks.set_tick_out(True)<br>
ax3.axis[:].major_ticks.set_tick_out(True)<br>
<br>
plt.show()<br>
--------------<br>
Error Log<br>
---------------------------------------------------------------------------<br>
TypeError                                 Traceback (most recent call last)<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\IPython\core\formatters.py in<br>
__call__(self, obj)<br>
    339                 pass<br>
    340             else:<br>
--> 341                 return printer(obj)<br>
    342             # Finally look for special method names<br>
    343             method = get_real_method(obj, self.print_method)<br>
<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\IPython\core\pylabtools.py in<br>
<lambda>(fig)<br>
    242 <br>
    243     if 'png' in formats:<br>
--> 244         png_formatter.for_type(Figure, lambda fig: print_figure(fig,<br>
'png', **kwargs))<br>
    245     if 'retina' in formats or 'png2x' in formats:<br>
    246         png_formatter.for_type(Figure, lambda fig:<br>
retina_figure(fig, **kwargs))<br>
<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\IPython\core\pylabtools.py in<br>
print_figure(fig, fmt, bbox_inches, **kwargs)<br>
    126 <br>
    127     bytes_io = BytesIO()<br>
--> 128     fig.canvas.print_figure(bytes_io, **kw)<br>
    129     data = bytes_io.getvalue()<br>
    130     if fmt == 'svg':<br>
<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\matplotlib\backend_bases.py in<br>
print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format,<br>
bbox_inches, **kwargs)<br>
   2051                     bbox_artists = kwargs.pop("bbox_extra_artists",<br>
None)<br>
   2052                     bbox_inches =<br>
self.figure.get_tightbbox(renderer,<br>
-> 2053                             bbox_extra_artists=bbox_artists)<br>
   2054                     pad = kwargs.pop("pad_inches", None)<br>
   2055                     if pad is None:<br>
<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\matplotlib\figure.py in<br>
get_tightbbox(self, renderer, bbox_extra_artists)<br>
   2274         bb.extend(<br>
   2275             ax.get_tightbbox(renderer,<br>
bbox_extra_artists=bbox_extra_artists)<br>
-> 2276             for ax in self.axes if ax.get_visible())<br>
   2277 <br>
   2278         if len(bb) == 0:<br>
<br>
C:\Anaconda3\envs\dloct2018\lib\site-packages\matplotlib\figure.py in<br>
<genexpr>(.0)<br>
   2274         bb.extend(<br>
   2275             ax.get_tightbbox(renderer,<br>
bbox_extra_artists=bbox_extra_artists)<br>
-> 2276             for ax in self.axes if ax.get_visible())<br>
   2277 <br>
   2278         if len(bb) == 0:<br>
<br>
TypeError: get_tightbbox() got an unexpected keyword argument<br>
'bbox_extra_artists'<br>
<br>
<Figure size 432x288 with 1 Axes><br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://matplotlib.1069221.n5.nabble.com/matplotlib-devel-f28077.html" rel="noreferrer" target="_blank">http://matplotlib.1069221.n5.nabble.com/matplotlib-devel-f28077.html</a><br>
_______________________________________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Thomas Caswell<br><a href="mailto:tcaswell@gmail.com" target="_blank">tcaswell@gmail.com</a></div>