pysteps icon indicating copy to clipboard operation
pysteps copied to clipboard

Extra axes added when plotting precipitation field with map

Open pulkkins opened this issue 10 months ago • 1 comments

Plotting precipitation field with a map produces extra axes when using newer versions of matplotlib. I'm using this code:

importer = pysteps.io.get_method("fmi_pgm", "importer")
importer_kwargs = {"gzipped": True}

filenames = pysteps.io.archive.find_by_date(
    date,
    root_path,
    path_fmt,
    fn_pattern,
    fn_ext,
    timestep=5,
    num_prev_files=5,
)
refl, quality, metadata = pysteps.io.read_timeseries(
    filenames, importer, **importer_kwargs
)

pysteps.visualization.plot_precip_field(refl[-1], geodata=metadata, units="dBZ")

Output with matplotlib 3.6.3: Image

Output with matplotlib 3.10.1: Image

pulkkins avatar Mar 05 '25 14:03 pulkkins

I just tested it running examples/plot_custom_precipitation_range.py with pysteps data and it looks like to work as expected. Can you confirm the issue is already solved?

Image

fedro86 avatar Sep 19 '25 21:09 fedro86