MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / get_rows_columns

Method get_rows_columns

site-packages/matplotlib/gridspec.py:463–476  ·  view source on GitHub ↗

Get the subplot row and column numbers: (``n_rows, n_cols, row_start, row_stop, col_start, col_stop``)

(self)

Source from the content-addressed store, hash-verified

461 return rows, cols, self.num1, self.num2
462
463 def get_rows_columns(self):
464 """
465 Get the subplot row and column numbers:
466 (``n_rows, n_cols, row_start, row_stop, col_start, col_stop``)
467 """
468 gridspec = self.get_gridspec()
469 nrows, ncols = gridspec.get_geometry()
470 row_start, col_start = divmod(self.num1, ncols)
471 if self.num2 is not None:
472 row_stop, col_stop = divmod(self.num2, ncols)
473 else:
474 row_stop = row_start
475 col_stop = col_start
476 return nrows, ncols, row_start, row_stop, col_start, col_stop
477
478 def get_position(self, figure, return_all=False):
479 """Update the subplot position from ``figure.subplotpars``.

Callers 4

_getmaxminrowcolumnFunction · 0.80
layoutcolorbargridspecFunction · 0.80
align_xlabelsMethod · 0.80
align_ylabelsMethod · 0.80

Calls 2

get_gridspecMethod · 0.95
get_geometryMethod · 0.45

Tested by

no test coverage detected