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

[FEAT] Horizontally stacked boxpoints #52

Merged
merged 6 commits into from
Jan 17, 2025
Merged

Conversation

carrascomj
Copy link
Member

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.

image

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/kde y (since they require different types), it was avoided.

ggshu(df, aes=aes(stack="isozyme", color="enz_concentration")) + geom_boxpoint()

Implementation

  • src/data.rs: A new optional Data input field is accepted for metabolism input. This triggers the generation of boxpoint Aesthetic entities with a new component that indicates the horizontal index and the name (sharing order with the reaction identifiers).
  • src/aes.rs and src/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 to geom_boxpoint, with its corresponding data handling.

@carrascomj carrascomj merged commit 8e4e49f into master Jan 17, 2025
3 checks passed
@carrascomj carrascomj deleted the feat-horizontal-boxpoints branch January 17, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple columns per condition for boxpoints
1 participant