From 1f5b57e4d3633342480e2f26cc605d4231f7411f Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Thu, 24 Oct 2024 01:59:37 +0300 Subject: [PATCH] Add trans.format method --- mizani/transforms.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mizani/transforms.py b/mizani/transforms.py index 1907556..36afd69 100644 --- a/mizani/transforms.py +++ b/mizani/transforms.py @@ -222,6 +222,15 @@ def breaks(self, limits: DomainType) -> NDArrayFloat: ) return breaks + def format(self, x: Any) -> Sequence[str]: + """ + Format breaks + + When subclassing, you can override this function, or you can + just define `format_func`. + """ + return self.format_func(x) + def diff_type_to_num(self, x: Any) -> FloatArrayLike: """ Convert the difference between two points in the domain to a numeric