MCPcopy Create free account
hub / github.com/Mic92/vmsh / change_width

Function change_width

tests/plot.py:127–133  ·  view source on GitHub ↗
(ax: Any, new_value: Union[int, float])

Source from the content-addressed store, hash-verified

125
126
127def 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
136def set_size(w: int, h: int, ax: Any) -> None:

Callers 1

apply_to_graphsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected