proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.12k stars 102 forks source link

format setting error #468

Open Duanclub1996 opened 2 weeks ago

Duanclub1996 commented 2 weeks ago

Description

I'm not sure if this is a bug. When I want to set the format in a loop, this exception occurs.

image

Steps to reproduce

fig = pplt.figure(space=0.8 ,refwidth='18em', wspace=2.6, hspace=3, refaspect = 0.618*2,span=False,sharey=False,sharex=False)
for i,num in enumerate(num_list):
    data = np.load(f'/notebook_workspace/dyq/dianji_project/result/feature_{num}.npy')
    label = np.load(f'/notebook_workspace/dyq/dianji_project/result/label_{num}.npy').reshape(-1)
    data = data.reshape(-1,5*128)
    # print(data.shape)
    x,y = TSNE(data)
    ax=fig.subplot(2,3,i+1)
    ax.scatter(x,y,c=label,s=2,a=0.8)
    fig.format(title=subtitle[i],fontsize=12)
    # ax.set_title(f'{subtitle[i]}')

Proplot version

image

matplotlib 3.8.0 proplot 0.9.91