Some classes may want to replace a hyphen for minus with the proper Unicode symbol (U+2212) for typographical correctness. This is a helper method to perform such a replacement when it is enabled via :rc:`axes.unicode_minus`.
(s)
| 299 | |
| 300 | @staticmethod |
| 301 | def fix_minus(s): |
| 302 | """ |
| 303 | Some classes may want to replace a hyphen for minus with the proper |
| 304 | Unicode symbol (U+2212) for typographical correctness. This is a |
| 305 | helper method to perform such a replacement when it is enabled via |
| 306 | :rc:`axes.unicode_minus`. |
| 307 | """ |
| 308 | return (s.replace('-', '\N{MINUS SIGN}') |
| 309 | if mpl.rcParams['axes.unicode_minus'] |
| 310 | else s) |
| 311 | |
| 312 | def _set_locator(self, locator): |
| 313 | """Subclasses may want to override this to set a locator.""" |
no outgoing calls
no test coverage detected