Skip to content

Conversation

@Illviljan
Copy link
Contributor

@Illviljan Illviljan commented Nov 13, 2023

  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
import matplotlib.pyplot as plt
import xarray as xr

airtemps = xr.tutorial.open_dataset("air_temperature")
air = airtemps.air - 273.15
air1d = air.isel(lat=10, lon=10)

plt.figure()
air1d.plot()

Before:
image

After:
image

@Illviljan Illviljan changed the title Use concise date format Use concise date format when plotting Nov 13, 2023
@Illviljan Illviljan marked this pull request as ready for review November 13, 2023 21:06
@dcherian
Copy link
Contributor

Looks great,

@jklymak is there a reason this isn't the default in matplotlib yet?

@jklymak
Copy link
Contributor

jklymak commented Nov 19, 2023

@dcherian Largely back compatibility concerns. Matplotlib doesn't like suddenly changing the appearance of plots if possible. I think its on the list for a style-break release.

Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Illviljan Illviljan added the plan to merge Final call for comments label Nov 20, 2023
@Illviljan Illviljan merged commit dcf5d74 into pydata:main Nov 21, 2023
dcherian added a commit to rabernat/xarray that referenced this pull request Nov 29, 2023
* upstream/main:
  Raise an informative error message when object array has mixed types (pydata#4700)
  Start renaming `dims` to `dim` (pydata#8487)
  Reduce redundancy between namedarray and variable tests (pydata#8405)
  Fix Zarr region transpose (pydata#8484)
  Refine rolling_exp error messages (pydata#8485)
  Use numbagg for `ffill` by default (pydata#8389)
  Fix bug for categorical pandas index with categories with EA dtype (pydata#8481)
  Improve "variable not found" error message (pydata#8474)
  Add whatsnew for pydata#8475 (pydata#8478)
  Allow `rank` to run on dask arrays (pydata#8475)
  Fix mypy tests (pydata#8476)
  Use concise date format when plotting (pydata#8449)
  Fix `map_blocks` docs' formatting (pydata#8464)
  Consolidate `_get_alpha` func (pydata#8465)
@Illviljan Illviljan deleted the plot_concise_date branch March 13, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments topic-plotting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants