issue_comments
10 rows where issue = 1368027148 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax · 10 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1464031031 | https://github.com/pydata/xarray/issues/7014#issuecomment-1464031031 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85XQ1c3 | veenstrajelmer 60435591 | 2023-03-10T16:07:26Z | 2023-03-10T16:07:43Z | CONTRIBUTOR | Thanks to @jklymak, there was an update in PR I created (https://github.com/pydata/xarray/pull/7553). @ghiggi with the code from this PR, your code shows identical plots (except for the first one, but that should be the case). Hopefully the PR can be merged somewhere soon. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1448588687 | https://github.com/pydata/xarray/issues/7014#issuecomment-1448588687 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85WV7WP | ghiggi 19285200 | 2023-02-28T17:33:46Z | 2023-02-28T17:34:24Z | NONE | @veenstrajelmer I am not sure I understand what you are saying. In the example I pass only
|
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1448311848 | https://github.com/pydata/xarray/issues/7014#issuecomment-1448311848 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85WU3wo | veenstrajelmer 60435591 | 2023-02-28T14:46:32Z | 2023-02-28T14:46:32Z | CONTRIBUTOR | @ghiggi: If I understand it correctly, your issue/examplecode covers multiple issues. Since one subissue might be using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1446791387 | https://github.com/pydata/xarray/issues/7014#issuecomment-1446791387 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85WPEjb | ghiggi 19285200 | 2023-02-27T17:58:15Z | 2023-02-27T22:22:44Z | NONE | Thanks to all the people above that have started digging into the problem !
@veenstrajelmer : Adding the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1446128457 | https://github.com/pydata/xarray/issues/7014#issuecomment-1446128457 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85WMitJ | veenstrajelmer 60435591 | 2023-02-27T11:06:40Z | 2023-02-27T11:18:17Z | CONTRIBUTOR | The related issues https://github.com/pydata/xarray/issues/4061 and https://github.com/Deltares/xugrid/issues/49 are fixed by supplying |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1441530710 | https://github.com/pydata/xarray/issues/7014#issuecomment-1441530710 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85V7ANW | veenstrajelmer 60435591 | 2023-02-23T10:36:36Z | 2023-02-23T15:55:21Z | CONTRIBUTOR | I just combined @Huite's suggestion with splitting the if-statement. This works for both solving the issue and keeping the testcases in However, a bit up in the code there is a I think it is a potential solution nevertheless, but some help is appreciated with the last steps. Also since the case of @ghiggi seems not to be solved with this fix. It does solve https://github.com/pydata/xarray/issues/4061 though. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1412027546 | https://github.com/pydata/xarray/issues/7014#issuecomment-1412027546 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85UKdSa | Huite 13662783 | 2023-02-01T13:06:09Z | 2023-02-01T13:06:45Z | CONTRIBUTOR | Debugging this, @headtr1ck points correctly to _determine_cmap_params:
The problem lies in the second line. In What then happens, is that the norm calls into the cmap. Calling into cmap doesn't do any checks whether the value is larger than N, it just takes the highest available value. The examples in #4061 show this quite clearly, but to illustrate: ```python import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np data = np.arange(100).reshape((10, 10)) cmap = mpl.cm.get_cmap("viridis") print(cmap.N) # 256 boundaries = [0, 25, 50, 75, 100] norm = mpl.colors.BoundaryNorm(boundaries, cmap.N) fig, ax = plt.subplots() ax.imshow(data, norm=norm, cmap=cmap) %%colors = [cmap(i/255) for i in np.linspace(0, cmap.N, len(boundaries) - 1)] new_cmap, new_norm = mpl.colors.from_levels_and_colors(boundaries, colors) print(new_cmap.N) # 4 fig, ax = plt.subplots() ax.imshow(data, norm=new_norm, cmap=new_cmap) %%Mismatchedfig, ax = plt.subplots() ax.imshow(data, norm=norm, cmap=new_cmap) %%``` This is avoided here by removing the conditional in the second line, or just making sure both cmap and norm are replaced by their new values:
Then, the cmap and norm remain in sync. However, when running the tests in ```python def test_norm_sets_vmin_vmax(self) -> None: vmin = self.data.min() vmax = self.data.max()
I don't understand why the conditional is there. At first sight, it doesn't make a lot of sense to create a new norm and cmap, but then take the original norm? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1410507317 | https://github.com/pydata/xarray/issues/7014#issuecomment-1410507317 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85UEqI1 | kmuehlbauer 5821660 | 2023-01-31T14:53:40Z | 2023-01-31T14:53:40Z | MEMBER | I'm still struggling to understand that whole workflow and it looks like this is no easy way of getting to the bottom of this. But adding kwarg The docstring gives a hint:
So in first case everything works nice since Not sure if aligning |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1410362988 | https://github.com/pydata/xarray/issues/7014#issuecomment-1410362988 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85UEG5s | veenstrajelmer 60435591 | 2023-01-31T13:32:44Z | 2023-01-31T13:32:44Z | CONTRIBUTOR | Is there any update on this issue? I have been running into the same problem recently and am happy to see that this issue was already recognized by others. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 | |
1242695626 | https://github.com/pydata/xarray/issues/7014#issuecomment-1242695626 | https://api.github.com/repos/pydata/xarray/issues/7014 | IC_kwDOAMm_X85KEgfK | headtr1ck 43316012 | 2022-09-10T10:23:19Z | 2022-09-10T10:23:19Z | COLLABORATOR | It seems that the Not sure what all this code is supposed to do, though... But hopefully these findings can help someone with better understanding to debug this :) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray imshow and pcolormesh behave badly when the array does not contain values larger the BoundaryNorm vmax 1368027148 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 5