Return scientific notation, plus offset.
(self)
| 766 | return f"{significand}e{exponent}" |
| 767 | |
| 768 | def get_offset(self): |
| 769 | """ |
| 770 | Return scientific notation, plus offset. |
| 771 | """ |
| 772 | if len(self._locs) == 0: |
| 773 | return '' |
| 774 | if self._orderOfMagnitude or self.offset: |
| 775 | offsetStr = '' |
| 776 | sciNotStr = '' |
| 777 | if self.offset: |
| 778 | offsetStr = self.format_data(self.offset) |
| 779 | if self.offset > 0: |
| 780 | offsetStr = '+' + offsetStr |
| 781 | if self._orderOfMagnitude: |
| 782 | if self._usetex or self._useMathText: |
| 783 | sciNotStr = self.format_data(10 ** self._orderOfMagnitude) |
| 784 | else: |
| 785 | sciNotStr = '1e%d' % self._orderOfMagnitude |
| 786 | if self._useMathText or self._usetex: |
| 787 | if sciNotStr != '': |
| 788 | sciNotStr = r'\times\mathdefault{%s}' % sciNotStr |
| 789 | s = fr'${sciNotStr}\mathdefault{{{offsetStr}}}$' |
| 790 | else: |
| 791 | s = ''.join((sciNotStr, offsetStr)) |
| 792 | return self.fix_minus(s) |
| 793 | return '' |
| 794 | |
| 795 | def set_locs(self, locs): |
| 796 | # docstring inherited |
nothing calls this directly
no test coverage detected