Skip to content

Use math.log10 instead of math.log for logarithmic plots#1060

Open
Sukuna0007Abhi wants to merge 1 commit intooss-aspen:devfrom
Sukuna0007Abhi:fix/use-log10-for-logarithmic-plots
Open

Use math.log10 instead of math.log for logarithmic plots#1060
Sukuna0007Abhi wants to merge 1 commit intooss-aspen:devfrom
Sukuna0007Abhi:fix/use-log10-for-logarithmic-plots

Conversation

@Sukuna0007Abhi
Copy link
Copy Markdown

Fixes #986

What I changed

Changed math.log (natural log, base e) to math.log10 (base 10) in the project velocity visualization. Also made the axes show actual values like 1, 10, 100, 1000 instead of log values.

Why

As @giordano mentioned in the issue, base-10 logarithms are way easier to understand. When you see a value between 3 and 4, you immediately know "that's thousands of commits" rather than having to calculate powers of e in your head.

What changed

  • All math.log calls now use math.log10
  • The graph axes show real values (10, 100, 1000, etc.) using Plotly's log_x and log_y
  • Hover tooltips show both the raw value and log10 value so you can see the comparison
  • This implements both the main fix and the "variation" suggested in the issue for showing linear tick values.

@cdolfi Thanks for tagging me on this one!

Pls review @cdolfi @MoralCode

- Changed all instances of math.log to math.log10 for base-10 logarithm
- Makes logarithmic scale more intuitive (decade-based reasoning)
- Implements plotly native log scale with linear axis ticks (1, 10, 100, 1000)
- Added log10 values to hover tooltips for educational comparison
- Values between 3-4 = thousands, 1-2 = dozens (easier to interpret)

This implements both the main request and the 'variation' suggested in the issue
for maximum readability and user experience.

Fixes oss-aspen#986

Signed-off-by: Sukuna0007Abhi <[email protected]>
Copy link
Copy Markdown
Collaborator

@cdolfi cdolfi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please only change from log to log 10 in this pr to stay within the scope of the issue

@Sukuna0007Abhi
Copy link
Copy Markdown
Author

please only change from log to log 10 in this pr to stay within the scope of the issue

Hi ma'am @cdolfi actually in the issue #986, @giordano suggested "variation" for showing linear tick values.

So, that's why I did both math.log to math.log10 and this variation...

The graph axes show real values (10, 100, 1000, etc.) using Plotly's log_x and log_y &
Hover tooltips show both the raw value and log10 value so you can see the comparison...

If you think this is not needed then I will revert it pls review one time more..

@MoralCode MoralCode added the stale Items that dont have an owner and may need to be closed or re-assigned to be completed label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Items that dont have an owner and may need to be closed or re-assigned to be completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use math.log10 instead of math.log for logarithmic plots

3 participants