-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add ability to create y axis tick labels #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is looking good! Just added few comments about style
I updated the Display segment of the update to better match the codebase style and better handle the Vec indexing Option. |
Also please update the PR description using new names :) |
I added the line to the label.rs example as well, if that's alright? |
I see it up on crates.io! Thanks. |
Ah, no worries, I will fix it later. Thanks for the PR! |
Of course. Happy to contribute! |
Just an FYI - https://docs.rs/textplots/latest/textplots/ still shows the out of date |
This Pull Request uses the Builder Pattern modeled in #47 to give the user the ability to add sparse or dense labeling of ticks along the y-axis. The same could not be done with the x-axis due to the text direction.
An example and plot are shown below:
A
TickDisplayBuilder
trait givesChart
ay_tick_display()
method for the user to specify the use of tick labels on the y-axis. Calling this method also slightly alters the height of the frame to give better accuracy of positioning and spacing between the labels.