epezent / epezent/implot

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

Open
#628 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

Dear @epezent, first off, thanks again for maintaining such a lean and well-integrated plotting library — keep up the great work! :+1:

### 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](https://github.com/user-attachments/assets/1c6ec65a-5eb0-4253-b63b-7f38e6847f9f)

Image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.