θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

feature: Ctx-aware axis label formatter (e.g. min/max, unified scaling)Β #628

@RalphSteinhagen

Description

@RalphSteinhagen

Dear @epezent, first off, thanks again for maintaining such a lean and well-integrated plotting library β€” keep up the great work! πŸ‘

Current behaviour

At present, SetupAxisFormat(...) only applies per-label formatting and lacks access to axis-level context (e.g. min/max range).
This makes it difficult to ensure coherent formatting across tick labels or to scale axis titles appropriately.

Feature request

It would be helpful if this axis formatting could optionally take the axis and other contexts into account β€” particularly the range and scaling β€” to enable:

  • a consistent number of significant digits across all tick labels
  • a significant digits choice based on the axis pixel width (e.g. compress/shorten labels if necessary)
  • automatic SI-prefix handling (e.g. k/M/G) applied once at the axis level, rather than individually per tick
  • dynamic axis title labels that reflect the applied scaling, e.g. current [kA] or frequency [GHz]

Such a feature would significantly improve the clarity of scientific/engineering plots, especially those with multiple axes or large dynamic range.

Thanks for considering β€” and again, kudos for the excellent work! πŸš€

Examples

Here are a few illustrations of the desired behaviour:

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions