bendichter/brokenaxes

AttributeError: 'SubplotSpec’object has no attribute 'is_first_col'

Closed this issue · 5 comments

I'm running into this despite having a new matplotlib version,but the histogram cannot appear:

微信图片_20231016105343

Could you please provide a full script for us to reproduce this error? Also, include your versions for matplotlib and brokenaxes.

I had a similar issue with an old version of brokenaxes, but it is fixed with brokenaxes=0.5.5 and matplotlib=3.7.1.

I meet the same wrong. I tried to use brokenaxes=0.5.5, but no this version.

I meet the same wrong. I tried to use brokenaxes=0.5.5, but no this version.

Can you provide a full script to reproduce this error?

The subplot example has the same wrong:
from brokenaxes import brokenaxes
from matplotlib.gridspec import GridSpec
import numpy as np

sps1, sps2 = GridSpec(2,1)

bax = brokenaxes(xlims=((.1, .3), (.7, .8)), subplot_spec=sps1)
x = np.linspace(0, 1, 100)
bax.plot(x, np.sin(x*30), ls=':', color='m')

x = np.random.poisson(3, 1000)
bax = brokenaxes(xlims=((0, 2.5), (3, 6)), subplot_spec=sps2)
bax.hist(x, histtype='bar')

I think this is an issue with matplotlib version. I have updated the requirements to matplotlib>3.6. Try upgrading matlab with e.g.

pip install -U matplotlib

If upgrading matplotlib does not fix the issue, please reopen.