Closed juliettelavoie closed 3 months ago
for 1, I dont understand why we use custom_cmap_norm
all the time (not what we do in gridmap) ?https://github.com/Ouranosinc/figanos/blob/be727b5c2d7eeefe92961b264c90b7f5a28bc3d9/src/figanos/matplotlib/plot.py#L1754
Is there a way to force the vmax and vmin, not make "make vmin and vmax prettier"
s
and markersize
. This is okay.I think its because of the way we deal with NaNs in scattermap (since they are not dealt with by xarray because of the markers). But we could test if it could be removed for the cmap
Setup Information
Description
I am having a few issues with
scattermap
.~2. Can't use markersize argument.~
Steps To Reproduce
fg.gridmap(ds_space,plot_kw={'vmin': 0,'vmax': 25,}) #-> works, max is 25
ds_stat=ds_space.isel(lat=100,lon=100).expand_dims(station=['test']) fg.scattermap(ds_stat,plot_kw={'vmin': 0,'vmax': 25,}) #-> doesn't works, max is 30
fg.scattermap(ds_stat,plot_kw={'vmin': 0,'vmax': 25,'markersize':10})
TypeError Traceback (most recent call last) Cell In[55], line 9 5 fg.gridmap(ds_space,plot_kw={'vmin': 0,'vmax': 25,}) #-> works, max is 25 8 ds_stat=ds_space.isel(lat=100,lon=100).expand_dims(station=['test']) ----> 9 fg.scattermap(ds_stat,plot_kw={'vmin': 0,'vmax': 25,'markersize':10}) #-> doesn't works, max is 30
File ~/Projets/figanos/src/figanos/matplotlib/plot.py:1729, in scattermap(data, ax, use_attrs, fig_kw, plot_kw, projection, transform, features, geometries_kw, sizes, size_range, cmap, levels, divergent, legend_kw, show_time, frame, enumerate_subplots) 1727 raise ValueError(f"{sizes} not found") 1728 else: -> 1729 raise TypeError("sizes must be a string or a bool") 1731 # nans sizes 1732 smask = ~np.isnan(sdata.values) & mask
TypeError: sizes must be a string or a bool