Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MAINT vega colormaps are deprecated in favor of tab #7971

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

Merged
merged 2 commits into from
Jan 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
MAINT vega colormaps are deprecated in favor of tab
  • Loading branch information
NelleV committed Jan 28, 2017
commit 4015f53ac53abc5878ca58c50d714e3029527f41
5 changes: 5 additions & 0 deletions 5 doc/users/whats_new/deprecations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deprecations
------------

- The "Vega" colormaps are deprecated in Matplotlib 2.0.1 and will be removed
Copy link
Member

@dstansby dstansby Jan 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth mentioning that they are simply being renamed, and that the "tab" colormaps are exactly the same as the now-old "vega" colormaps.

in Matplotlib 2.2. Use the "tab" colormaps instead.
4 changes: 2 additions & 2 deletions 4 examples/color/colormaps_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral',
'seismic']),
('Qualitative', ['Accent', 'Dark2', 'Paired', 'Pastel1',
'Pastel2', 'Set1', 'Set2', 'Set3', 'Vega10',
'Vega20', 'Vega20b', 'Vega20c']),
'Pastel2', 'Set1', 'Set2', 'Set3', 'tab10',
'tab20', 'tab20b', 'tab20c']),
('Miscellaneous', ['gist_earth', 'terrain', 'ocean', 'gist_stern',
'brg', 'CMRmap', 'cubehelix',
'gnuplot', 'gnuplot2', 'gist_ncar',
Expand Down
30 changes: 22 additions & 8 deletions 30 lib/matplotlib/_cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ def gfunc32(x):
# (divided by 255)
#

_Vega10_data = (
_tab10_data = (
(0.12156862745098039, 0.4666666666666667, 0.7058823529411765 ), # 1f77b4
(1.0, 0.4980392156862745, 0.054901960784313725), # ff7f0e
(0.17254901960784313, 0.6274509803921569, 0.17254901960784313 ), # 2ca02c
Expand All @@ -1296,7 +1296,7 @@ def gfunc32(x):
(0.09019607843137255, 0.7450980392156863, 0.8117647058823529), # 17becf
)

_Vega20_data = (
_tab20_data = (
(0.12156862745098039, 0.4666666666666667, 0.7058823529411765 ), # 1f77b4
(0.6823529411764706, 0.7803921568627451, 0.9098039215686274 ), # aec7e8
(1.0, 0.4980392156862745, 0.054901960784313725), # ff7f0e
Expand All @@ -1319,7 +1319,7 @@ def gfunc32(x):
(0.6196078431372549, 0.8549019607843137, 0.8980392156862745), # 9edae5
)

_Vega20b_data = (
_tab20b_data = (
(0.2235294117647059, 0.23137254901960785, 0.4745098039215686 ), # 393b79
(0.3215686274509804, 0.32941176470588235, 0.6392156862745098 ), # 5254a3
(0.4196078431372549, 0.43137254901960786, 0.8117647058823529 ), # 6b6ecf
Expand All @@ -1342,7 +1342,7 @@ def gfunc32(x):
(0.8705882352941177, 0.6196078431372549, 0.8392156862745098 ), # de9ed6
)

_Vega20c_data = (
_tab20c_data = (
(0.19215686274509805, 0.5098039215686274, 0.7411764705882353 ), # 3182bd
(0.4196078431372549, 0.6823529411764706, 0.8392156862745098 ), # 6baed6
(0.6196078431372549, 0.792156862745098, 0.8823529411764706 ), # 9ecae1
Expand Down Expand Up @@ -1380,6 +1380,15 @@ def __getitem__(self, key):
alternative="nipy_spectral and nipy_spectral_r",
obj_type="colormap"
)
elif key in ["Vega10", "Vega10_r", "Vega20", "Vega20_r", "Vega20b",
"Vega20b_r", "Vega20c", "Vega20c_r"]:
warn_deprecated(
"2.0",
name="Vega colormaps",
alternative="tab",
obj_type="colormap"
)

return super(_deprecation_datad, self).__getitem__(key)


Expand Down Expand Up @@ -1465,7 +1474,12 @@ def __getitem__(self, key):
datad['Set2'] = {'listed': _Set2_data}
datad['Set3'] = {'listed': _Set3_data}

datad['Vega10'] = {'listed': _Vega10_data}
datad['Vega20'] = {'listed': _Vega20_data}
datad['Vega20b'] = {'listed': _Vega20b_data}
datad['Vega20c'] = {'listed': _Vega20c_data}
datad['tab10'] = {'listed': _tab10_data}
datad['tab20'] = {'listed': _tab20_data}
datad['tab20b'] = {'listed': _tab20b_data}
datad['tab20c'] = {'listed': _tab20c_data}

datad['Vega10'] = {'listed': _tab10_data}
datad['Vega20'] = {'listed': _tab20_data}
datad['Vega20b'] = {'listed': _tab20b_data}
datad['Vega20c'] = {'listed': _tab20c_data}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.