Skip to content

Remove bundled viridis colormap #2211

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

Closed
shoyer opened this issue Jun 1, 2018 · 4 comments
Closed

Remove bundled viridis colormap #2211

shoyer opened this issue Jun 1, 2018 · 4 comments

Comments

@shoyer
Copy link
Member

shoyer commented Jun 1, 2018

We currently bundle the viridis colormap with xarray:

def _load_default_cmap(fname='default_colormap.csv'):
"""
Returns viridis color map
"""
from matplotlib.colors import LinearSegmentedColormap
# Not sure what the first arg here should be
f = pkg_resources.resource_stream(__name__, fname)
cm_data = pd.read_csv(f, header=None).values
f.close()
return LinearSegmentedColormap.from_list('viridis', cm_data)

https://github.com/pydata/xarray/blob/master/xarray/plot/default_colormap.csv

This is unnecessary these days and adds a small amount of packaging complexity. It's not unreasonable to expect at least matplotlib 1.5.x, which comes with viridis installed.

@jhamman
Copy link
Member

jhamman commented Jun 1, 2018

+1. Do you want me to add this to my minimum versions update (#2204)?

@shoyer
Copy link
Member Author

shoyer commented Jun 1, 2018

@jhamman sure, that sounds great!

@jhamman
Copy link
Member

jhamman commented Jun 1, 2018

Done in be637d7.

@jhamman
Copy link
Member

jhamman commented Jul 9, 2018

closed via #2204

@jhamman jhamman closed this as completed Jul 9, 2018
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

No branches or pull requests

2 participants