tensorflow / tensorflow/tensorboard
Scientific notation on y axis appears when unhelpful
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
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.

-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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TensorBoard plot axis-formatting entry point and reproduce the y-axis behavior described in the issue, using the attached screenshot and numeric examples as reference. The work is done when scientific notation is used only when it represents the plotted range more compactly without hiding relevant precision, including for values close to zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100