home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "MEMBER", issue = 98629509 and user = 2443309 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • jhamman · 6 ✖

issue 1

  • Discrete colormap/colorbar option · 6 ✖

author_association 1

  • MEMBER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
128230468 https://github.com/pydata/xarray/pull/509#issuecomment-128230468 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyODIzMDQ2OA== jhamman 2443309 2015-08-06T04:11:22Z 2015-08-06T04:11:22Z MEMBER

@shoyer - have a good time.

@clarkfitzg - I think I've addressed all your comments, including returning a dict from _determine_cmap_params. If there is nothing else, I'll merge this tomorrow.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509
128091418 https://github.com/pydata/xarray/pull/509#issuecomment-128091418 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyODA5MTQxOA== jhamman 2443309 2015-08-05T17:56:46Z 2015-08-05T17:56:46Z MEMBER

@shoyer - I added a bunch of tests this morning and checked off the list of documentation and error handling items. Take another look and let me know if you think we need anymore tests or changes to the docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509
127673118 https://github.com/pydata/xarray/pull/509#issuecomment-127673118 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyNzY3MzExOA== jhamman 2443309 2015-08-04T16:51:59Z 2015-08-05T17:24:21Z MEMBER

This looks good. Thanks for doing that.

Are there any cases where you would want to set vmin/vmax to something other than the first and last levels?

Yes, but they are rare and you could pass in a custom norm in those cases.

This assuredly still needs more tests -- mostly to verify that every plot types ends up with consistent levels.

I'll think a bit more about how to test these aspects.


There are three things left to do here (this has gotten a big bigger than I was expecting): - [x] Decide what to do with seaborn's handling of jet - [x] Fill in tests - [x] Add an example in the plot docs

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509
127471969 https://github.com/pydata/xarray/pull/509#issuecomment-127471969 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyNzQ3MTk2OQ== jhamman 2443309 2015-08-04T04:10:44Z 2015-08-04T04:10:44Z MEMBER

@shoyer - This last commit (119c1c8) should have addressed the issues you brought up. I updated my examples a bit to show how things are working:

``` python %matplotlib inline import matplotlib.pyplot as plt import numpy as np import xray

sample DataArray

x = np.arange(start=0, stop=10, step=2) y = np.arange(start=9, stop=-7, step=-3) xy = np.dstack(np.meshgrid(x, y)) distance = np.linalg.norm(xy, axis=2) distance = xray.DataArray(distance, list(zip(('y', 'x'), (y, x))))

Sample plots

fig, axes = plt.subplots(3, 2, figsize=(8, 8), sharex=True, sharey=True) distance.plot(ax=axes[0, 0]) axes[0, 0].set_title('Default') distance.plot(vmin=0, vmax=12, levels=6, ax=axes[1, 0]) axes[1, 0].set_title('Setting with integer levels') distance.plot(levels=[1, 2, 4, 5, 7, 9], extend='max', cmap='Spectral', ax=axes[0, 1]) axes[0, 1].set_title('Setting with list of levels') flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"] distance.plot(levels=[1, 2, 4, 5, 7], cmap=flatui, extend='both', ax=axes[1, 1]) axes[1, 1].set_title('Using custom list of colors') distance.plot.contourf(ax=axes[2, 0]) axes[2, 0].set_title('Default contourf')

distance.plot.contourf(levels=4, ax=axes[2, 1]) axes[2, 1].set_title('contourf w/ int levels')

plt.tight_layout() ```

If the user sets the extend, vmax, or vmin arguments, those are not overridden. This is shown in the top right plot where I set extend='max' even though the min of the data is less than the min of levels. This results in the data less than the min of levels not being show. For the same reason, we also don't use the MaxNLocator if vmin or vmax was provided.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509
127357707 https://github.com/pydata/xarray/pull/509#issuecomment-127357707 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyNzM1NzcwNw== jhamman 2443309 2015-08-03T18:14:10Z 2015-08-03T18:14:10Z MEMBER

The logic for inferring the extend keyword argument needs to be updated to handle levels:

How do you want to handle this? Options for when levels is provided and extend == None: 1. Don't extend. This will result in data outside the range of levels being masked out, 2. Extend if the min/max of the data exceed the range of levels, or 3. Require extend to be specified when levels is provided.

I will add the MaxNLocator ticker for integer levels. I agree this is the way to go.

I think this logic will also help address your 4th point:

...contourf currently crashes if you supply levels as an integer. This should be fixed, probably by converting levels into a 1d array / list if they are supplied as an integer before passing it into contourf. This would actually be more broadly useful, because currently there is no way to supply a non-default integer number of levels with contourf -- matplotlb appears to only expose the N argument when it is used positionally.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509
127076768 https://github.com/pydata/xarray/pull/509#issuecomment-127076768 https://api.github.com/repos/pydata/xarray/issues/509 MDEyOklzc3VlQ29tbWVudDEyNzA3Njc2OA== jhamman 2443309 2015-08-02T22:16:17Z 2015-08-02T22:16:17Z MEMBER

These last two commits have resolved the two issues I brought up above.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Discrete colormap/colorbar option 98629509

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 70.417ms · About: xarray-datasette