/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/python/lab-1112-016/main.py
17 строк
452 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
def setup_figure( title: str = "Matplotlib experiment", width: float = 8.0, height: float = 5.0, style: str = "seaborn-v0_8-whitegrid", ) -> tuple: import matplotlib.pyplot as plt plt.style.use(style) fig, ax = plt.subplots(figsize=(width, height)) ax.set_title(title) return fig, ax # Пример использования: fig, ax = setup_figure("Мой график") ax.plot([1, 2, 3], [1, 4, 9]) plt.show()