{{ message }}
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.

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.
It seems odd that this special casing has to be done, what's stopping the more generic code path on L1228 being hit below? (perhaps
LogNormdoesn't have a_scaleattribute set?)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.
The contours have boundaries so we get caught in the first case which just uses a linear scale.
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.
Should that first case be modified to get the scale from
self.norm._scale(if present) instead then?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.
Yes, thanks, I think you are right. Lets see if this passes the other tests...
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.
Yes, this works, and I think is more consistent with what users would want for other boundary norm cases. Thanks!
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 now seems like you are special-casing LogNorms only for contoursets.
I think the main issue is that there are some
self.boundaries, but the norm is changed so we don't want to take that path, so perhaps we could add a check on the norm below.What I'm worried about is that we are whacking the
LogLocator()with this change, but we also want to be able to handle any other special-cased locators too without adding additional if clauses above.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.
It may be valid, but I'm not following your concern here. This is usually only called at init, or if the norm is changed, both of which are pretty destructive to the colorbar. Everything gets whacked, as noted in the docstring.
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.
My concern is mostly that this handles:
locator=ticker.LogLocator(), and will this mean that we'll also need to special caseSymmetricalLogLocator()in the future.But, looking at the contour code it looks like only log-scales are special cased, and they set an explicit
logscaledattribute. So, should we actually be using that here instead?if getattr(self.mappable, "logscale", False):