8000 MAINT deprecated 'spectral' in favor of 'nipy_spectral' by NelleV · Pull Request #7416 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MAINT deprecated 'spectral' in favor of 'nipy_spectral' #7416

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 6 commits into from
Nov 10, 2016
Merged
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
Prev Previous commit
MAINT updated pyplot with new boilerplate script
  • Loading branch information
NelleV committed Nov 9, 2016
commit 954bf7a7404f362986efea61e779d49433de0441
68 changes: 46 additions & 22 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,8 @@ def boxplot(x, notch=None, sym=None, vert=None, whis=None, positions=None,
conf_intervals=None, meanline=None, showmeans=None, showcaps=None,
showbox=None, showfliers=None, boxprops=None, labels=None,
flierprops=None, medianprops=None, meanprops=None, capprops=None,
whiskerprops=None, manage_xticks=True, hold=None, data=None):
whiskerprops=None, manage_xticks=True, autorange=False, zorder=None,
hold=None, data=None):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
Expand All @@ -2624,7 +2625,8 @@ def boxplot(x, notch=None, sym=None, vert=None, whis=None, positions=None,
flierprops=flierprops, medianprops=medianprops,
meanprops=meanprops, capprops=capprops,
whiskerprops=whiskerprops,
manage_xticks=manage_xticks, data=data)
manage_xticks=manage_xticks, autorange=autorange,
zorder=zorder, data=data)
finally:
ax.hold(washold)

Expand Down Expand Up @@ -2812,17 +2814,17 @@ def fill_between(x, y1, y2=0, where=None, interpolate=False, step=None,
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
@_autogen_docstring(Axes.fill_betweenx)
def fill_betweenx(y, x1, x2=0, where=None, step=None, hold=None, data=None,
**kwargs):
def fill_betweenx(y, x1, x2=0, where=None, step=None, interpolate=False,
hold=None, data=None, **kwargs):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()

if hold is not None:
ax.hold(hold)
try:
ret = ax.fill_betweenx(y, x1, x2=x2, where=where, step=step, data=data,
**kwargs)
ret = ax.fill_betweenx(y, x1, x2=x2, where=where, step=step,
interpolate=interpolate, data=data, **kwargs)
finally:
ax.hold(washold)

Expand Down Expand Up @@ -2857,7 +2859,7 @@ def hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear',
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
@_autogen_docstring(Axes.hist)
def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False,
def hist(x, bins=None, range=None, normed=False, weights=None, cumulative=False,
bottom=None, histtype='bar', align='mid', orientation='vertical',
rwidth=None, log=False, color=None, label=None, stacked=False,
hold=None, data=None, **kwargs):
Expand Down Expand Up @@ -3285,7 +3287,8 @@ def step(x, y, *args, **kwargs):
@_autogen_docstring(Axes.streamplot)
def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None,
norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1,
transform=None, zorder=2, start_points=None, hold=None, data=None):
transform=None, zorder=None, start_points=None, hold=None,
data=None):
ax = gca()
# allow callers to override the hold state by passing hold=True|False
washold = ax.ishold()
Expand Down Expand Up @@ -3722,20 +3725,6 @@ def winter():
im.set_cmap(cm.winter)


# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def spectral():
'''
set the default colormap to spectral and apply to current image if any.
See help(colormaps) for more information
'''
rc('image', cmap='spectral')
im = gci()

if im is not None:
im.set_cmap(cm.spectral)


# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def magma():
Expand Down Expand Up @@ -3791,4 +3780,39 @@ def viridis():
if im is not None:
im.set_cmap(cm.viridis)


# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def nipy_spectral():
'''
set the default colormap to nipy_spectral and apply to current image if any.
See help(colormaps) for more information
'''
rc('image', cmap='nipy_spectral')
im = gci()

if im is not None:
im.set_cmap(cm.nipy_spectral)


# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
def spectral():
'''
set the default colormap to spectral and apply to current image if any.
See help(colormaps) for more information
'''
from matplotlib.cbook import warn_deprecated
warn_deprecated(
"2.0",
name="spectral",
obj_type="colormap"
)

rc('image', cmap='spectral')
im = gci()

if im is not None:
im.set_cmap(cm.spectral)

_setup_pyplot_info_docstrings()
0