raphaelquast / EOmaps

A library to create interactive maps of geographical datasets
https://eomaps.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
339 stars 25 forks source link

Plotting marker colors with RGB tuples #203

Closed raphaelquast closed 9 months ago

raphaelquast commented 1 year ago

Discussed in https://github.com/raphaelquast/EOmaps/discussions/202

Originally posted by **opierpaoli** December 2, 2023 Hi, I recently updated my version of EOmaps from 5.3 to 7.3 using Anaconda, and I can no longer use RGB tuples as the face color when calling plot_map(). If I run the code below, I get the warning "EOmaps: Unable to plot the data for the layer 'base'!". Thank you. ```python from matplotlib.pyplot as plt from eomaps import Maps import numpy as np x, y = np.meshgrid(np.linspace(-20, 40, 100), np.linspace(50, 70, 50)) r = np.random.randint(0, 100, x.shape) / 100 g = np.random.randint(0, 100, x.shape) / 100 b = [0.4] a = np.random.randint(0, 100, x.shape) / 100 m = Maps() m.add_feature.preset.ocean() m.set_data(data=None, x=x, y=y) m.plot_map(fc=(r, g, b, a)) ```
raphaelquast commented 1 year ago

@opierpaoli Thanks for reporting this, it will be fixed in the next version (released soon)!

raphaelquast commented 1 year ago

EOmaps v7.3.2 is now released and updating should fix your issues with RGB/RGBA composites!

opierpaoli commented 11 months ago

Hi, I am still having issues with the RGB composites. In some cases, I am still unable to plot the RGB colors. I am happy to provide the code I am using if needed.

raphaelquast commented 11 months ago

Hi, sorry to hear that!

If you can provide a minimal example that reproduces your error, I can have a look!

raphaelquast commented 10 months ago

Hey @opierpaoli is this issue still relevant?

raphaelquast commented 9 months ago

I'm closing this for now... feel free to re-open if you think it's still relevant!