-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SI prefixes don't display Peta (P) correctly #4787
Comments
Thanks @joshlk - I guess this is just a question of which prefixes we assume are well-enough known to include, as clearly at some point this needs to flip over to exponential notation. Tera is pretty common, and coincidentally matches the T in trillion. Peta we deemed to be less universally recognized, though in certain fields it and even Exa are in common use. Perhaps this could be made configureable in some way? |
Hi @alexcjohnson, thanks for the reply. The SI prefixes are defined from q (10^-30) to Q (10^30), and different scientific fields will frequently use different ranges of these prefixes. For example, in computing, Peta FLOPS or Eta FLOPS measurements are common. Also d3-format's formatPrefix function can display numbers in (mostly) the full SI unit range (10^-24 to 10^24). If we don't want Plotly to display the full SI range, could we add a comment to the documentation to make this explicit? Even better, could we just enable plotly to be able to use the full range of SI prefixes 🙂 |
Perhaps the simplest would be to add a new mode like |
Hi, great. I am happy to make this contribution. Would it be possible to persuade you to extend the current SI format instead of making another? It seems like a more coherent solution as the documentation doesn't specify that it currently only displays SI units in the f (10^-15) to T (10^12) range. My expectation would be that if a user enables SI units then isn't it safe to assume that they won't mistake "P" to mean something other than Peta? |
Looks like @dberardi99 beat you to it 🎉 🙇 I’d be happy to hear more opinions on this - seems to me though that since any solution we come up with MUST switch to exponential notation at some point, documenting where that happens is a separate concern from extending it. And to my mind making the full range standard carries too high a risk of making a graph that viewers can’t properly interpret, either because they don’t know as many of these prefixes as the graph creator or because new data has come in to an existing graph that extends its range. |
Take this example whereby I set the
exponentformat="SI"
to use SI prefixes for the y-axis:This correctly displays the y-axis using Tera (T) SI prefix units
If you increase the numbers so they are in the Peta (P) range:
It stops using SI prefixes on the y-axis and displays the numbers using x10^15:
The text was updated successfully, but these errors were encountered: