Skip to content

Need to clarify the scope of axes.number #305

@Hem-W

Description

@Hem-W

I guess the meaning of axes.number is not clear or confined now. Some internal functions rely on this property to count the sequence of axes, but fig.add_subplot allows user to specify number on their own. However, this may lead to a bit of confusion, especially for abc format, after the fix #167 .

fig = uplt.figure(figwidth=3, figheight=2)
ax1 = fig.add_subplot(131, number=2, abc=True)
ax2 = fig.add_subplot(132, number=4, abc=True)
ax3 = fig.add_subplot(133, number=6, abc=True)

fig.show()

Image

fig = uplt.figure(figwidth=3, figheight=2)
ax1 = fig.add_subplot(131, number=2)
ax2 = fig.add_subplot(132, number=4)
ax3 = fig.add_subplot(133, number=6)

axes = fig.subplotgrid
axes.format(abc=True)
fig.show()

Image

This fix comes with an assumption that a subplots always starts with axes.number=1. Before this fix, for uplt.subplots, I can change the starting number to have a different starting letter of abc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions