Skip to content
Advertisement

Tag: superscript

Superscripting a string in python

Hello I am trying to superscript a string for a plot. And the result i get is: The “-0,2*x” should be superscripted. What am I doing wrong? Thank you! Answer It IS making the – a superscript. To get the whole expression in there, you need to enclose the whole expression in curly braces. Since you have this in an

Python: scientific notation with superscript exponent

I’m attempting to format numbers in scientific notation with exponents of base 10, e.g. write 0.00123 as 1.23×10–3, using python 3. I found this great function which prints 1.23×10^-3, but how can the caret-exponent be replaced with a superscript? The function is modified from https://stackoverflow.com/a/29261252/8542513. I’ve attempted to incorporate the answer from https://stackoverflow.com/a/8651690/8542513 to format the superscript, but I’m not

Advertisement