Skip to content

Percentage tick labels #336

Closed
Closed

Description

@sfiruch

What can we do to make ScottPlot better?
I'm trying to do a Scatter plott with percentages on both axes. It'd be great it ScottPlot supported conversion from "0.3184" to "31.8%" with a simple flag.

var plot = new ScottPlot.Plot();
...
plot.Ticks(percentages: true);

A more flexible, alternative solution of #297 might help in this case as well.

Activity

  1. swharden commented on Apr 6, 2020

    @swharden
    Member

    I'm trying to do a Scatter plott with percentages on both axes. It'd be great it ScottPlot supported conversion from "0.3184" to "31.8%" with a simple flag.

    Hi @deiruch thanks for the suggestion! I think this is true, and a flexible option that also supported currency would be nice. I'll think about the best way to implement this and make an update soon!

  2. swharden commented on Apr 6, 2020

    @swharden
    Member

    Hey @deiruch, thanks again for the suggestion! I think this solution is an improvement across the board.

    Users can now define a standard numeric string format for X and Y tick labels. This lets users display ticks using scientific notation, percentage, currency, etc. and also control the precision of the numbers displayed in tick labels.

    plt.Ticks(numericFormatStringX: "E2", numericFormatStringY: "P1");

    image

    What do you think?

  3. sfiruch commented on Apr 7, 2020

    @sfiruch
    Author

    Fantastic! Exactly what I was looking for!!!

    Thank you very much! ScottPlot is much appreciated!

  4. added a commit that references this issue on Apr 7, 2020
  5. swharden commented on Apr 7, 2020

    @swharden
    Member

    Just published a NuGet package. It should be live shortly. Let me know if anything else comes up.

    Thanks again @deiruch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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