Skip to content

Scientific notation on y axis appears when unhelpful #1205

@iansf

Description

@iansf

TensorBoard plots switch to scientific notation for 5 digit numbers, which requires more characters to represent, and actually hides relevant precision, as demonstrated in the attached screenshot.

screen shot 2018-05-22 at 11 27 56 am

-1.329e+4 -- 9 characters for 4 digits of precision and sign.
-13290 -- 6 characters for 5 digits of precision and sign.

It seems clear that scientific notation should only be enabled when the range of the plots contains numbers with more digits than would be used with the (less precise) scientific notation representation. In other words, scientific notation should only be used when one or both ends of the range has a magnitude >= 10^(5+desired digits of precision), where the 5 comes from the first digit, the decimal point, and the minimum number of exponent characters, which is 3.

The same basic reasoning also applies to numbers close to 0.

  • TensorBoard version (from pip package, also printed out when running tensorboard)
    TensorBoard 67
  • Python version (e.g. 2.7, 3.5)
    Python 2.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions