-
Notifications
You must be signed in to change notification settings - Fork 7
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
update plot scripts to work with Python 3 changes; improve heatmap legibility #10
base: main
Are you sure you want to change the base?
Conversation
… if any input is 0
Don't display decimal point if value is an integer
The viridis colormap is pretty dark for values in the first third of the range. Colour the labels white in this range to aid readability.
Thanks for making your performance portability framework public; I found it exceedingly useful in replicating your work on different hardware! I made a few changes to the plotting scripts (included in this PR) which I hope you'll agree are improvements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for using the scripts, and for proposing changes!
You might also be interested in our efforts over at https://github.com/intel/p3-analysis-library; we've basically been trying to turn some of these scripts into a library, and it contains a few improvements (to the cascade plots in particular).
# Set color map to match blackbody, growing brighter for higher values | ||
colors = "gist_heat" | ||
fig.set_figwidth(fig.get_figwidth() / 5 * len(l)) | ||
colors = "viridis" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment above this still accurate?
if 0 in n: | ||
return 0 | ||
return geometric_mean(n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously this branch was being used to prevent geometric_mean
from being imported with Python versions that didn't exist. I don't think this new code will work with older Python versions. That may be okay, but I'm not sure what @tomdeakin plans for compatibility here.
Use a portable interpreter line for Python 3
Update in line with Numpy, Matplotlib, Pandas deprecations and removals
Use a data-dependent (rather than fixed) heatmap size
Return 0 for geomean if any input is 0 (previously, would crash for Python versions < 3.13)
Don't display decimal point in heatmap for integer values
Use viridis in heatmap for colourblind viewing
Display percentages in heatmap to one decimal place