Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fix for #9 was causing me some problems with scale. I was getting the following behavior, which I'm pretty sure isn't expected:
I was essentially having the reverse problem to the other users in in the issue. When stepping through,
nice()
was selecting a step size of2
in its first calculation, then going back to5
for its second (and thus not updating the domain). However,ticks()
was calculating2
as its step size, and therefore only going up to 14.These are not the only numbers where I was seeing this problem, I just picked these ones in particular for an example.
The fix here updates the domain twice, instead of only updating the step size twice. I think it fixes my problem, without adversely affecting any other situations. In the example I gave, we now have
I think under ideal circumstances we'd have,
But changing that would require changing the tick error constants, and I'm guessing there's a reason they are the way they are.