-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make states fill_color="none" (transparent) #643
Conversation
I would like to skip importing and calling geoviews: ``` import pandas as pd import hvplot.pandas import geoviews as gv df = pd.read_html( "https://mesonet.agron.iastate.edu/sites/networks.php?station=ORD&network=IL_ASOS" )[1] # make snake case df.columns = df.columns.str.lower().str.replace(" ", "_") map = df.hvplot.points( "longitude1", "latitude1", geo=True, ) # overlay the map states = gv.feature.states(fill_color="none") map * states ``` And instead do this: ``` import pandas as pd import hvplot.pandas import geoviews as gv df = pd.read_html( "https://mesonet.agron.iastate.edu/sites/networks.php?station=ORD&network=IL_ASOS" )[1] # make snake case df.columns = df.columns.str.lower().str.replace(" ", "_") map = df.hvplot.points( "longitude1", "latitude1", geo=True, features=["states"] ) # overlay the map map ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you update the CHANGELOG.md
and doc/releases.rst
with a comment about this PR today, I will add this to the next release. Maybe a small comment about this is a (small) breaking change.
Using color makes sense to me. That will be the first thing coming to mind when wanting a background color, not the alpha.
See here: https://github.com/holoviz/geoviews/pull/637/files
Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
Okay done; feel free to make direct edits if needed! |
Thank you for the quick turnaround. |
Thanks for getting this in! Can't wait to use it in hvplot! |
Closes #512 (not sure why I closed the previous PR; perhaps because it was stale).
Also not sure if it's a better choice to set fill_alpha vs fill_color. I leaned towards fill_color rather than fill_alpha because I worry users might be confused if they change fill_color and it doesn't show anything.
I would like to skip importing and calling geoviews:
And instead, do this:
At the moment, it shows this: