GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix `clabel` manual argument not accepting unit-typed coordinates by aman-coder03 · Pull Request #31278 · matplotlib/matplotlib Conversation
Contributor
PR summarywhen unit typed coordinates(e.g datetime) are passed to the fixed by calling AI DisclosurePR checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Hi @aman-coder03 thank you for your interest in contributing to Matplotlib! Please can you run the example from the issue with your branch, and post the image that it now produces. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
failing tests are unrelated to this fix |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for posting the image. I agree that looks correct. Please can you modify this test so it covers the case you are fixing. matplotlib/lib/matplotlib/tests/test_datetime.py Lines 262 to 266 in 51a1ab6
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@rcomer i have added the test now! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for adding the test. Is there any way it could be simplified, but still fail without your change? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
yes @rcomer working on simplifying it, will push a commit shortly |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aman-coder03. This seems right to me.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| fig, ax = plt.subplots() | ||
| ax.clabel(...) | ||
| CS = ax.contour(X, Y, Z) | ||
| ax.clabel(CS, manual=[(x[0], dates[0])]) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you test that the label is set to the expected value?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
sure i can add an assertion on the label value, what would be the best way to check it, assert on the text string or the position?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Both?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…ing unit-typed coordinates
…278-on-v3.10.x Backport PR #31278 on branch v3.10.x (Fix `clabel` manual argument not accepting unit-typed coordinates)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug]: clabel manual argument does not accept units
There was an error while loading. Please reload this page.