Skip to content
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

Add option for variable fill opacity in contourf_to_geojson() #18

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

DemetrisChr
Copy link
Contributor

@DemetrisChr DemetrisChr commented Jun 21, 2020

I added an option to specify a range of fill opacity values in contourf_to_geojson() (via the fill_opacity_range argument). It is a tuple of two numbers, min and max. The fill opacity is linearly interpolated from the range based on the contour levels. Lower contour levels have lower opacity. By default fill_opacity_range is set to None, hence ignored if it’s not specified. If fill_opacity_range is specified, fill_opacity is ignored.

This could be useful for cases where it is important to highlight the higher contours (example below).

Constant fill opacity Variable fill opacity
Untitled Untitled(1)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 1663eb2 on DemetrisChr:opacity-range into df4e491 on bartromgens:master.

@bartromgens bartromgens merged commit 405a98b into bartromgens:master Jun 26, 2020
@bartromgens
Copy link
Owner

@DemetrisChr Thanks. I just created a new release (v0.4.0) that contains this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants