Fix plotting-related warnings
Description
There were deprecation warnings popping up in the darks notebooks, caused by cal_tools.plotting.show_overview
.
I don't like warnings, so I changed the rcParams
and updated the colorbar instantiation as some matplotlib documentation indicated.
Also, the logic handling label colors and colorbar labels for each subplots was a bit buggy, so I fixed that.
How Has This Been Tested?
In the AGIPD darks notebook, I inserted the updated function definition and re-ran the cell. It looked fine. I also shuffled around the order to ensure that the labels get colored appropriately.
Old plot:
- Note the wrong label on the bad pixels colorbar
- Label on bad pixels subplot is white and so invisible (hopefully, otherwise we have many bad pixels)
- Weird logarithm of bad pixel codes - probably because
NaN
is plotted as white which gives good contrast?
New plot:
- Labels fixed
- Still has weird logarithm on bad pixel codes
New new plot:
- Now bad pixel plot is just white 0 for "good", black 1 for "bad" instead of weird logarithm
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.
- I have not added tests where appropriate :(
Reviewers
If no complaints come up, will merge later today.
Edited by David Hammer