-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix gridliner when datalim updated by constrained layout #2254
Conversation
array=[1, 2, 3, 4], | ||
) | ||
ax.add_collection(collection) | ||
fig.colorbar(collection, ax=ax, location='right') |
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 problem does show up if the colorbar isn't included, but is less obvious.
@@ -481,11 +481,12 @@ def _draw_preprocess(self, renderer): | |||
if self.get_autoscale_on() and self.ignore_existing_data_limits: | |||
self.autoscale_view() | |||
|
|||
self.apply_aspect() |
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.
Add a comment indicating this needs to come before the other updates so we don't accidentally move it somewhere else 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.
Done
ax.autoscale() | ||
|
||
# Add some gridlines | ||
ax.gridlines(draw_labels=["bottom", "left"], auto_update=True) |
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.
Would it help to have the gridlines "solid" rather than dashed for these tests? I feel like sometimes the tolerances are because some of the dashes slightly moving along the line rather than the full line moving up/down. Maybe that is just my eyes though.
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.
Done
cce20d6
to
8fb8caf
Compare
8fb8caf
to
caa4745
Compare
Rationale
Fixes #2245. See #2245 (comment) for an explanation.
Implications