Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]: Streamline mpltoolkits.axes_grid.Grid API #27963

Open
@timhoffm

Description

@timhoffm

Summary

The current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic.

Proposed fix

Half a note to self, because this is not completely thought through:

  • The parameterngrids seems not to be working (usage raises)
  • The attributesngrids is not helpful. It's misnomed (naxes would be better), and it's equivalent tolen(grid) orlen(grid.axes_all).
  • Not sure what we needgrid.axes_llc for. That seems quite specific.
  • The 2D grid arrangementaxes_row,axes_column are lists of lists. In contrastsubplots returns an array. Thus, you need double indexinggrid.axes_row[row][col} and cannot use the multi-indexaxs[row, col].
  • Having thedirection parameter andgrid.axes_row,grid.axes_column is basically two redundant approaches towards ordering.

Possible improvements:

  • deprecatengrids attribute - replaced byFix ngrids support in axes_grid.Grid(). #27972
  • add an attributegrid.axes or maybe evengrid.axs (in analogy tofig, axs = plt.subplots(2, 3)), which is a ndarray of the Axes. Hence one could dogrid.axs[row, column].
  • maybe (??) soft-deprecate axes_all, axes_row, axes_col, direction?
  • inGrid.__init__ make everything afternrows_ncols kw-only
  • would be nice to have a defaultrect, but that requires reorganizing parameter order because that's beforenrows_ncols.
    Might be possible migrate
    def __init__(self, fig, rect, nrows_ncols, *, ...)
    to
    def __init__(self, nrows_ncols, *, rect, ...)
    with reasonable deprecation warnings and catching inappropriate use. - But would have to think this through

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp