add: legend modification parameters and output DPI#758
Merged
sharkdp merged 6 commits intosharkdp:masterfrom Jul 17, 2024
Merged
add: legend modification parameters and output DPI#758sharkdp merged 6 commits intosharkdp:masterfrom
sharkdp merged 6 commits intosharkdp:masterfrom
Conversation
This commit adds a CLI parameter to plot_histogram in order to position the legend of the plot on the diagram. It also defines the output DPI for the plot to 600 dpi. Plot_progression gets a CLI paramter to add a custom label and to overwrite the default one.
Spreadcat
commented
Jul 10, 2024
Contributor
Author
Spreadcat
left a comment
There was a problem hiding this comment.
cleaned up in the changes.
sharkdp
reviewed
Jul 16, 2024
scripts/plot_histogram.py
Outdated
| ) | ||
| parser.add_argument("--bins", help="Number of bins (default: auto)") | ||
| parser.add_argument( | ||
| "--lloc", help="Location of the legend on plot (default: upper center)", |
Owner
There was a problem hiding this comment.
"lloc" doesn't seem to be a standard abbreviation, not even in matplotlib, which is full of cryptic terms. Would it hurt to call this --legend-location?
Contributor
Author
There was a problem hiding this comment.
No problem there. It was just lazy-typing to use "lloc" instead of "legend-location". I've change the name of the parameter as you can see. But wait with the merge. I've just quickly wanted to test the script to make sure the changes work and I got a python error. I'll just have a look at this and then put the MR back to active/no-draft when ready.
Done.
Changed variable "lloc" to "legend-location"
The variable name of "legen-location" (as parameter) becomes "legend_location" (with an underscore), not(!) "legend-location"
Owner
|
Thank you very much for your contribution! |
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 commit adds a CLI parameter to plot_histogram in order to position the legend of the plot on the diagram.
It also defines the output DPI for the plot to 600 dpi.