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.
Added Arrow Annotation Feature to
plot2D_samples_mat
FunctionChanges:
New Parameter
draw_arrows
: Introduced an optional boolean parameterdraw_arrows
to theplot2D_samples_mat
function. When set toTrue
, this parameter allows users to plot arrows in the middle of the lines connecting source and target samples. This helps to visually identify the direction from source to target.Arrow Placement: The arrows are strategically placed at the midpoint of the lines for clear visualization.
Arrow Properties: The color and alpha (transparency) of the arrows match the lines they are associated with, ensuring visual consistency.
As a visual example, this update allows the user to choose between these two types.
Motivation:
The addition of the arrow annotation feature enhances the visual representation of the connections between source and target samples. Especially in cases where directionality matters, these arrows provide a clearer understanding of the flow from source to target.
Code:
The main code changes involve:
plt.annotate
method to draw an arrow at the calculated midpoint.Example Usage:
Types of changes
Motivation and context / Related issue
How has this been tested (if it applies)
PR checklist