Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify process of using manual ticks #3814

Closed
swharden opened this issue May 8, 2024 · 0 comments · Fixed by #3831
Closed

Simplify process of using manual ticks #3814

swharden opened this issue May 8, 2024 · 0 comments · Fixed by #3831

Comments

@swharden
Copy link
Member

swharden commented May 8, 2024

Let's not break the existing API, it's fine, but let's add a shortcut so it's easier to do this:

ScottPlot.TickGenerators.NumericManual gen = new();
plt.Axes.Bottom.TickGenerator = gen;
for (int i = 0; i < 10; i++)
    gen.AddMajor(i, "test");

Maybe we can wrap that functionality in a function like:

double[] xs = [1, 2, 3];
string[] labels = ["one", "two", "three"];
plt.Axes.Bottom.SetTicks(xs, labels);
@swharden swharden linked a pull request May 16, 2024 that will close this issue
swharden added a commit to Giviruk/ScottPlot that referenced this issue May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant