master > master: src - widgets
This commit is contained in:
@@ -63,7 +63,7 @@ class Function(Generic[T1,T2]):
|
||||
];
|
||||
return getattr(self, '_indexes');
|
||||
|
||||
def draw(self) -> Figure:
|
||||
def draw(self) -> tuple[Figure, Axes]:
|
||||
return Functions(self).draw();
|
||||
|
||||
class Functions:
|
||||
@@ -74,7 +74,7 @@ class Functions:
|
||||
self.fcts = list(f);
|
||||
self.name = r' \circ '.join([ fct.name[0] for fct in self.fcts ][::-1]);
|
||||
|
||||
def draw(self, show_labels: bool = True) -> Figure:
|
||||
def draw(self, show_labels: bool = True) -> tuple[Figure, Axes]:
|
||||
N = len(self.fcts);
|
||||
obj = mplot.subplots(1, 1, constrained_layout=True);
|
||||
fig: Figure = obj[0];
|
||||
@@ -165,8 +165,7 @@ class Functions:
|
||||
|
||||
# update range of composition:
|
||||
comp_range = comp_range_next;
|
||||
|
||||
return fig;
|
||||
return fig, axs;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# AUXILIARY
|
||||
|
||||
Reference in New Issue
Block a user