Histogram margin & Plot caption#24
Open
Pavel-Sedlacek wants to merge 3 commits into
Open
Conversation
wentasah
requested changes
May 5, 2026
| >, | ||
| scaled_axis_descriptor: &[ScaledAxisDescriptor; 2], | ||
| sizes: &PlotSpacing, | ||
| fmap: impl Fn(T) -> i64, |
Collaborator
There was a problem hiding this comment.
I don't think it's necessary to add an extra parameter here. If I see correctly, you convert the i64 value to f64 in SiPrefix::express_value() anyway. So use f64 everywhere and avoid these extra conversions forth and back.
Contributor
Author
| element_id: i64, | ||
| property: &AnalysisProperty, | ||
| ) -> color_eyre::eyre::Result<PlottableData> { | ||
| ) -> color_eyre::eyre::Result<(String, PlottableData)> { |
Collaborator
There was a problem hiding this comment.
I'd prefer changing PlottableData to be a struct and adding a title field into it.
Open
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 PR introduces a 10% margin (5% of the bin width on each side) between histogram bins to separate between adjacent bins with identical heights.
It also adds a CLI flag to enable plot captions. The caption is derived from the name stored in the results file for each graph element:
/node element(where element type can be e.g.Callback(Subscriber(/topic)))/topic (/source_node -> /target_node)