mirror of
https://github.com/Findus23/rebound-collisions.git
synced 2024-09-19 15:53:48 +02:00
14 lines
338 B
Python
14 lines
338 B
Python
from typing import Tuple
|
|
|
|
from matplotlib import pyplot as plt
|
|
from matplotlib.axes import Axes
|
|
from matplotlib.figure import Figure
|
|
|
|
|
|
def create_figure() -> Tuple[Figure, Axes]:
|
|
"""
|
|
helper function for matplotlib OOP interface with proper typing
|
|
"""
|
|
fig: Figure = plt.figure()
|
|
ax: Axes = fig.gca()
|
|
return fig, ax
|