Skip to content

Gridspec indexing not matching with multi-legends #468

@cvanelteren

Description

@cvanelteren

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions