Skip to content

Allow Axis Labels in different radices #469

@bclehmann

Description

@bclehmann

What can we do to make ScottPlot better?
In some domains number systems other than decimal are appropriate. For example hexadecimal in Computer Science and Electrical Engineering (and to a lesser extent octal).

You would think this would be provided by the overload which allows the ticks to take format strings, however, the hexadecimal x format specifier is only valid for integral types and the ticks are doubles.

I suggest something like this:

plt.TicksRadixX(int radix = 16, string prefix = "0x");
plt.TicksRadixY(int radix = 16, string prefix = "0x");

Another notation for non-decimal radices is to put the base in subscript after the number: image

The prefix notation is going to be easier to implement, even though it doesn't generalize to other radices (except octal with prefix "0" and binary "0b"). In reality bases other than decimal and hex are rare. I'm unsure if the prefix should be on by default or not.

Check the ScottPlot Roadmap to see if your feature is already planned for an upcoming release:
https://github.com/swharden/ScottPlot/blob/master/dev/roadmap.md

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