Skip to content

Feat: Axis log scale#156

Merged
brenocq merged 16 commits into
mainfrom
feat/axis-log-scale
Nov 28, 2025
Merged

Feat: Axis log scale#156
brenocq merged 16 commits into
mainfrom
feat/axis-log-scale

Conversation

@brenocq
Copy link
Copy Markdown
Owner

@brenocq brenocq commented Nov 28, 2025

Closes #112

This pull request introduces support for non-linear axis transforms (such as logarithmic and symmetric log scales), enhanced axis panning and zooming logic, and better numerical stability. The changes ensure that user interactions (panning, zooming) and axis fitting behave correctly for both linear and non-linear axes, and add new API methods for configuring axis transforms.

Axis Transform Support and API

  • Added new functions (SetupAxisScale) to configure axis transforms (logarithmic, symmetric log, or custom) for each axis, updating internal transform and locator functions accordingly.
  • Axis constraints and zoom limits now use double precision for improved accuracy and consistency with axis transforms.

Panning and Zooming Logic

  • Refactored panning and zooming logic in HandleInput to use transformed reference points in NDC/pixel space, ensuring correct behavior for non-linear axes and proper handling of axis inversion.
  • Plane/axis translation now computes new ranges by projecting reference points with mouse deltas, supporting non-linear scales robustly.

Axis Tick Generation

  • Implemented new locator and tick generation functions for logarithmic and symmetric log axes, including automatic exponent step sizing and minor tick placement.

Numerical Stability and Precision

  • Improved numerical precision in coordinate conversions and axis fitting, using double values throughout and updating transform caches after fitting.
  • Fixed type conversions in utility functions for greater accuracy.

@brenocq brenocq self-assigned this Nov 28, 2025
@brenocq brenocq linked an issue Nov 28, 2025 that may be closed by this pull request
11 tasks
@github-actions github-actions Bot added status:review The task is under review prio:high High priority type:feat New feature or request labels Nov 28, 2025
@brenocq brenocq force-pushed the feat/axis-log-scale branch from bd532df to cb9ad8a Compare November 28, 2025 12:00
@brenocq brenocq merged commit 56be3fb into main Nov 28, 2025
9 checks passed
@brenocq brenocq deleted the feat/axis-log-scale branch November 28, 2025 12:02
@github-actions github-actions Bot added status:done Task completed successfully and removed status:review The task is under review labels Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prio:high High priority status:done Task completed successfully type:feat New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Axis log scale

1 participant