-
Notifications
You must be signed in to change notification settings - Fork 26
Value By Alpha specification #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
also, we would need to check if the cmap is divergent. If it is, we may offer a Essentially, we need to offer all options for the rgb matrix for the alpha channel as well. |
Here's an example on how to pass RGBA tuples to In [35]: import geopandas
In [36]: from shapely.geometry import Polygon
In [37]: import random
In [26]: import matplotlib
In [30]: cols = matplotlib.colors.to_rgba_array(['r', 'g', 'k', 'b'])
In [31]: cols
Out[31]:
array([[ 1. , 0. , 0. , 1. ],
[ 0. , 0.5, 0. , 1. ],
[ 0. , 0. , 0. , 1. ],
[ 0. , 0. , 1. , 1. ]])
In [32]: cols[:, -1] = [0.5, 0.7, 0.9, 0.2]
In [33]: s = geopandas.GeoSeries([Polygon([(random.random(), random.random()) for i in range(3)]) for _ in range(4)])
In [34]: s.plot(color=cols)
Out[34]: <matplotlib.axes._subplots.AxesSubplot at 0x7fc0d783cd68> |
pr #28 is a start dealing with
|
@ljwolf @darribas @sjsrey do you think it makes sense to allow as to say do we try and squeeze everything in one function eg. or do we create a class and build something like:
|
@darribas and I talked, and we think it makes the most sense for value-by-alpha maps to be implemented as follows:
The text was updated successfully, but these errors were encountered: