Skip to content

Commit

Permalink
Add trans.format method
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Oct 23, 2024
1 parent a071b6c commit 1f5b57e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mizani/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f5b57e

Please sign in to comment.