w, h: width, height in inches
(w: int, h: int, ax: Any)
| 134 | |
| 135 | |
| 136 | def set_size(w: int, h: int, ax: Any) -> None: |
| 137 | """w, h: width, height in inches""" |
| 138 | if not ax: |
| 139 | ax = plt.gca() |
| 140 | left = ax.figure.subplotpars.left |
| 141 | right = ax.figure.subplotpars.right |
| 142 | top = ax.figure.subplotpars.top |
| 143 | bottom = ax.figure.subplotpars.bottom |
| 144 | figw = float(w) / (right - left) |
| 145 | figh = float(h) / (top - bottom) |
| 146 | ax.figure.set_size_inches(figw, figh) |
| 147 | |
| 148 | |
| 149 | def apply_to_graphs(ax: Any, legend: bool, width: float) -> Any: |
nothing calls this directly
no outgoing calls
no test coverage detected