MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_height_ratios

Method set_height_ratios

lib/matplotlib/gridspec.py:123–135  ·  view source on GitHub ↗

Set the relative heights of the rows. *height_ratios* must be of length *nrows*. Each row gets a relative height of ``height_ratios[i] / sum(height_ratios)``.

(self, height_ratios)

Source from the content-addressed store, hash-verified

121 return self._col_width_ratios
122
123 def set_height_ratios(self, height_ratios):
124 """
125 Set the relative heights of the rows.
126
127 *height_ratios* must be of length *nrows*. Each row gets a relative
128 height of ``height_ratios[i] / sum(height_ratios)``.
129 """
130 if height_ratios is None:
131 height_ratios = [1] * self._nrows
132 elif len(height_ratios) != self._nrows:
133 raise ValueError('Expected the given number of height ratios to '
134 'match the number of rows of the grid')
135 self._row_height_ratios = height_ratios
136
137 def get_height_ratios(self):
138 """

Callers 2

__init__Method · 0.95
make_axes_gridspecFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected