(ax: Any, new_value: Union[int, float])
| 125 | |
| 126 | |
| 127 | def change_width(ax: Any, new_value: Union[int, float]) -> None: |
| 128 | for patch in ax.patches: |
| 129 | current_width = patch.get_width() |
| 130 | diff = current_width - new_value |
| 131 | patch.set_width(new_value) |
| 132 | |
| 133 | patch.set_x(patch.get_x() + diff * 0.5) |
| 134 | |
| 135 | |
| 136 | def set_size(w: int, h: int, ax: Any) -> None: |