home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 488190500 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • dcherian 3
  • Ricbrag 3
  • zxdawn 2
  • RylanSchaeffer 1
  • aaraney 1

author_association 2

  • NONE 7
  • MEMBER 3

issue 1

  • Change the label size and tick label size of colorbar · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
971907644 https://github.com/pydata/xarray/issues/3275#issuecomment-971907644 https://api.github.com/repos/pydata/xarray/issues/3275 IC_kwDOAMm_X8457iI8 Ricbrag 56003213 2021-11-17T19:33:47Z 2021-11-17T19:38:25Z NONE

Works nicely! Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
861131549 https://github.com/pydata/xarray/issues/3275#issuecomment-861131549 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDg2MTEzMTU0OQ== aaraney 39420640 2021-06-15T02:57:58Z 2021-06-15T02:57:58Z NONE

@Ricbrag something like this should work:

```python import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt

a=np.random.rand(10,10) im=plt.imshow(a) cb=plt.colorbar(im,orientation='horizontal').set_label(label='Label',size=20,weight='bold')

im.figure.axes[0].tick_params(axis="both", labelsize=5) im.figure.axes[1].tick_params(axis="x", labelsize=20)

plt.show() ```

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
811788372 https://github.com/pydata/xarray/issues/3275#issuecomment-811788372 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDgxMTc4ODM3Mg== Ricbrag 56003213 2021-04-01T09:40:23Z 2021-04-01T09:52:15Z NONE

Hi all, I'm trying to use these tricks to increase the tick label of an imshow horizontal colorbar but, I'm getting error (1) on: set add_colorbar=False

If I do not try to set add_colorbar=False I got error (2) on: cb.ax.tick_params(labelsize='large')

Test example: a=np.random.rand(10,10) im=plt.imshow(a,add_colorbar=False) cb=plt.colorbar(im,orientation='horizontal').set_label(label='Label',size=20,weight='bold') cb.ax.tick_params(labelsize='large')

Error(1): AttributeError: Unknown property add_colorbar Error(2): AttributeError: 'NoneType' object has no attribute 'ax'

Any suggestions?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
811794272 https://github.com/pydata/xarray/issues/3275#issuecomment-811794272 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDgxMTc5NDI3Mg== Ricbrag 56003213 2021-04-01T09:51:19Z 2021-04-01T09:51:19Z NONE

I solve my problem using matplotlib.rcParams to change xtick.labelsize (that controls also the horizontal colorbar tick). Still don't know how to decouple the axis tick size from colorbar tick size. here is the code: import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt

mpl.rcParams['xtick.labelsize'] = 20 mpl.rcParams['ytick.labelsize'] = 20 a=np.random.rand(10,10) im=plt.imshow(a) cb=plt.colorbar(im,orientation='horizontal').set_label(label='Label',size=20,weight='bold') plt.show()

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
633794290 https://github.com/pydata/xarray/issues/3275#issuecomment-633794290 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDYzMzc5NDI5MA== RylanSchaeffer 8942987 2020-05-26T03:55:24Z 2020-05-26T03:55:24Z NONE

Is there still no rcParams for colorbars?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
527482301 https://github.com/pydata/xarray/issues/3275#issuecomment-527482301 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDUyNzQ4MjMwMQ== dcherian 2448579 2019-09-03T14:25:15Z 2019-09-03T14:25:27Z MEMBER

What I meant was you can set the defaults using rcParams (https://matplotlib.org/users/customizing.html#matplotlib-rcparams). However there doesn't seem to be any rcParams for colorbars :(. Looks like you'll have to make the colorbar manually.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
527422655 https://github.com/pydata/xarray/issues/3275#issuecomment-527422655 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDUyNzQyMjY1NQ== zxdawn 30388627 2019-09-03T11:42:00Z 2019-09-03T11:42:00Z NONE

@dcherian Can't find how to do that by rcParams. Could you give a simple example?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
527174540 https://github.com/pydata/xarray/issues/3275#issuecomment-527174540 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDUyNzE3NDU0MA== dcherian 2448579 2019-09-02T14:51:39Z 2019-09-02T14:51:39Z MEMBER

@zxdawn you are welcome.

The other thing you could do is set the relevant rcParams and then xarray's automatic colorbars will look the way you want them to.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
527150960 https://github.com/pydata/xarray/issues/3275#issuecomment-527150960 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDUyNzE1MDk2MA== zxdawn 30388627 2019-09-02T13:36:18Z 2019-09-02T13:36:18Z NONE

@dcherian Thanks! Figure out now:

``` import xarray as xr import matplotlib.pyplot as plt

airtemps = xr.tutorial.open_dataset('air_temperature') air = airtemps.air - 273.15 air2d = air.isel(time=500)

im = air2d.plot.pcolormesh(add_colorbar=False) cb = plt.colorbar(im, orientation="horizontal", pad=0.15) cb.set_label(label='Temperature ($^{\circ}$C)', size='large', weight='bold') cb.ax.tick_params(labelsize='large') ```

{
    "total_count": 6,
    "+1": 6,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500
527148779 https://github.com/pydata/xarray/issues/3275#issuecomment-527148779 https://api.github.com/repos/pydata/xarray/issues/3275 MDEyOklzc3VlQ29tbWVudDUyNzE0ODc3OQ== dcherian 2448579 2019-09-02T13:29:09Z 2019-09-02T13:29:42Z MEMBER

size and labelsize don't work in cbar_kwargs.

In that case, you will have to pass add_colorbar=False and create your own colorbar.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change the label size and tick label size of colorbar 488190500

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 48.449ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows