JohnJ
JohnJ

Reputation: 7056

plotly small numbers showing as `n`, `p` or `f`

I am using plotly to plot some data (small numbers) and I see weird formats such as 78.98p, 576.65n, 678.76f

What the F are these? :( There is no explanation anywhere as to what these are.

How can I turn them to say scientific notation with an E?

Upvotes: 3

Views: 3180

Answers (2)

Jan
Jan

Reputation: 675

You did not provide a code example, but in general

fig.update_yaxes(exponentformat = 'E')

should be what you look for (for values on the y axes).

Upvotes: 1

PythonNoob
PythonNoob

Reputation: 1052

See this https://plot.ly/python/reference/#parcoords-line-colorbar-exponentformat

exponentformat ( enumerated : "none" | "e" | "E" | "power" | "SI" | "B" ) 
default: "B" 
Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B.

Upvotes: 6

Related Questions