Skip to content

SP5: Add tick label formatter to ITickGenerator #2500

@chhh

Description

@chhh

ScottPlot Version:
5.0.2-beta

Operating System:
Win10

Application Type:
console (i'm plotting off screen)

Question: Describe your question here
I'm plotting Scatters with 2 series. They share x-axis (bottom), but have different y-axes (left and right).
Secondary Y axis (on the right) is created as ScottPlot.Axis.StandardAxes.RightAxis axYRight = new();
The problem: All the labels for ticks on that axis turn out to be rendered the same. If the values on the axis are below 1000, then I see some values after decimal point, but for values over 1000 - they're all rendered the same (the variance for that axis is very small, it's common to have values like 2000.0001, 2000.0002...

Here's an example (notice right y-axis labels):
MzTrace_09448_MZ=1068 92

In v4 there was a way to set custom format for axis tick labels. I can't find an equivalent for v5.

I think it won't add too much of an overhead to compare the printed labels (strings) and increase the formatting precision until at least some labels are different (or all labels are different). Is there such functionality already available? Or is it a good project for contribution to the project?

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