[FEAT] Horizontally stacked boxpoints #52
Merged
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.
Closes #47.
Description
Add the ability to have more than one boxpoint per arrow and condition, stacking them horizontally. This allows the representation of isozymes.
Text tags are added as appear in the data to indicate the particular variant and the horizontal alignment is shared across conditions.
Grammar of graphics
A new aesthetic was introduced to indicate the variable that controls horizontal stacking:
stack
.y
would have been also a good choice but, since it will always clash with the hist/kdey
(since they require different types), it was avoided.Implementation
src/data.rs
: A new optionalData
input field is accepted for metabolism input. This triggers the generation of boxpointAesthetic
entities with a new component that indicates the horizontal index and the name (sharing order with the reaction identifiers).src/aes.rs
andsrc/funcplot.rs
: boxpoints can add different boxes per arrow in the x-axis (condition-wise as before) and now also in the y-axis (box_variant-wise).src/aes.rs
:Text2d
tags are spawned together with each box per condition and variant.ggshu
: the new aes was added togeom_boxpoint
, with its corresponding data handling.