Deprecations¶
Version 0.3.0¶
Quickplot¶
- The API for quickplot has changed:
quickplot is now a function rather than a module.
The quickplot function will attempt to infer an “optimal” style for the data passed to it, based on the metadata of the data.
You cannot currently choose different plot types (e.g. contour, scatter, etc.) using the quickplot function. This will be added in a future release. If you want more control over the plot type, you should construct the plot from the core earthkit.plots API.
Deprecated code |
import earthkit.data
import earthkit.plots.quickmap as qmap
data = earthkit.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
qmap.plot(data)
|
New code |
import earthkit.data
import earthkit.plots
data = earthkit.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
earthkit.plots.quickplot(data)
|
plot → quickplot¶
The plot method on earthkit.plots.Map objects has been deprecated and will be removed in a future release. The quickplot function should be used instead.
Deprecated code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.plot(data)
|
New code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.quickplot(data)
|
block → grid_cells¶
The block method on earthkit.plots.Map objects has been renamed to grid_cells. The new name is more descriptive of the method’s functionality, which is to represent the original grid cells of the data.
Deprecated code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.block(data)
|
New code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.grid_cells(data)
|
gridpoints → grid_points¶
The gridpoints method on earthkit.plots.Map objects has been renamed to grid_points. The new name follows the naming convention of other methods in earthkit.plots.
Deprecated code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.gridpoints(data)
|
New code |
import earthkit as ek
data = ek.data.from_source("sample", "era5-monthly-mean-2t-199312.grib")
chart = ek.plots.Map()
chart.grid_points(data)
|