-
Notifications
You must be signed in to change notification settings - Fork 320
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
Defaults for Smart color scale #1255
Defaults for Smart color scale #1255
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1255 +/- ##
=========================================
- Coverage 70.51% 70.5% -0.02%
=========================================
Files 74 74
Lines 8092 8095 +3
=========================================
+ Hits 5706 5707 +1
- Misses 2386 2388 +2 |
qcodes/dataset/plotting.py
Outdated
@@ -29,7 +30,7 @@ def plot_by_id(run_id: int, | |||
Sequence[ | |||
matplotlib.colorbar.Colorbar]]]=None, | |||
rescale_axes: bool=True, | |||
smart_colorscale: bool=False) -> AxesTupleList: | |||
smart_colorscale: Union[bool,None]=None) -> AxesTupleList: |
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.
This should be Optional[bool]
i think. Which is equivalent but less ugly
qcodes/dataset/plotting.py
Outdated
@@ -68,6 +69,9 @@ def plot_by_id(run_id: int, | |||
colorbar axes may be None if no colorbar is created (e.g. for | |||
1D plots) | |||
""" | |||
# defaults | |||
smart_colorscale = smart_colorscale or config.gui.smart_colorscale |
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 this logic correct?
None or True => True
None or False => False
True or False => True
True or True => True
False or False => True
Seems correct
but
False or True => True
seems wrong to me?
I.e if you pass False to the function but it's enabled in the config it will be enabled anyway?
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.
That is indeed a very good point.
Merge: 4cfcf7a 7a3849c Author: Dominik Vogel <[email protected]> Merge pull request #1255 from Dominik-Vogel/smart_color_scale
This is a commit that got lost in the pipeline to #1253