Related to #461. When plot multiple legends, rows and cols of loc_axs may result in wrong value here due to hiden panel. I've tried many examples, sometimes legend will be placed in wrong places, and sometimes it will raise errors. e.g:
import ultraplot as pplt
fig,axs=pplt.subplots(ncols=3, nrows=3,refwidth='3cm')
axs.plot([1,2], [1,2], label='line')
fig.legend(ref=axs[0],loc='b') //comment this line, error will go away
fig.legend(ref=axs[:, 1],loc='r')
Originally posted by @gepcel in #459