Skip to content

Exponentformat SI and type log with ticksuffix results in wrong minor tick markings #3689

@dries007

Description

@dries007

I'm plotting a benchmark frequency graph, where the Y axis is (normally) a log scale in the 100M to 1G range.
I'm doing this by using the following options:

{
  "yaxis": {
    "exponentformat": "SI",
    "ticksuffix": "Hz",
    "type": "log",
  },
}

Example: https://jsfiddle.net/sk5v0gx6/

This results when there is at least 1 "major" tick:
image

If there is only "minor" ticks, this is the results: (What I'd consider the correct behaviour.)
image

As you can see the first example omits the 'exponent format', but it does put in the suffix. I think this results in a confusing graph.

I think there are a number of possible fixes for this:

  1. Put the SI prefix in the minor tick, along with actual number (not just the 1-9) (My personal preference.)
  2. Allow an option to only specify suffixes on major ticks. Maybe via showticksuffix. This would still make the graph less readable IMO, but it would at least make it clear the graph doesn't jump from 1GHz to 9Hz.

If this is something that would get accepted as a PR, I'm willing to try and implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions