Log scales for plots#251
Draft
JamesWiresmith wants to merge 7 commits into
Draft
Conversation
Separated the axis logic from the transform logic in preparation for being able to support log axis. This still has cases that won't work as an API for log axis but provides a starting point with all tests passing. Failing tests on drawing grid lines and marks though.
Got the basics of log scale working with an inner linear scale based on the exponent. Now need to handle the more complex transforms.
Looked to remove it - in most cases was just used to define a sensible minimum - but some tests have broken so still need to review
* Looked at the usage of the linear scales and attempted to abstract better domain methods.
Still some issues to work out related to scaling, the demo shows a memory issue which I need to understand. Something related to line generation I think
Nearly working but we get an error due to having to handle the option of a pointer co-oridnate on a drag. Also need to work out the base spacing
|
View snapshot changes at kitdiff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a draft PR for adding log scales to the plots. I've taken a different route to others that I feel will help with future maintenance and issues but happy to defer to other solutions that get the feature in.
The first changes extract the axis space mapping from the transform as a separate axis space. This encapsulates the mapping and allows a common interface that other axis space must add.
The abstraction has been adjusted to remove assumptions of linear space in other functions.
Finally the log space has been added, using a nested linear space for the exponent of the input values meaning we can reuse much of that mapping.
The reason it is still a draft is: