Skip to content
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
Prev Previous commit
Next Next commit
Stop disabling loglog, semilog, plot_date, and fix _redirect wrapper
  • Loading branch information
lukelbd committed Sep 15, 2019
commit 5f8284f1ffbdacfa2134c84f8adfc3915de52f72
8 changes: 0 additions & 8 deletions proplot/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,14 +1380,6 @@ def _iter_panels(self, sides='lrbt'):
axs.append(ax)
return axs

# Disabled methods
_disable = _disable_decorator('Redundant plotting method {!r} has been disabled. Instead, use ax.plot() and set logarithmic axis scales with ax.format(xscale="log", yscale="log").')
loglog = _disable(maxes.Axes.loglog)
semilogx = _disable(maxes.Axes.semilogx)
semilogy = _disable(maxes.Axes.semilogy)
_disable = _disable_decorator('Redundant plotting method {!r} has been disabled. Instead, pass np.datetime64 or datetime.datetime data to ax.plot(), and datetime axes will be enabled automatically.')
plot_date = _disable(maxes.Axes.plot_date)

# Wrapped by special functions
# Also support redirecting to Basemap methods
text = _text_wrapper(
Expand Down
4 changes: 3 additions & 1 deletion proplot/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2705,7 +2705,9 @@ def wrapper(self, *args, **kwargs):
return getattr(self.projection, name)(*args, ax=self, **kwargs)
else:
return func(self, *args, **kwargs)
return functools.wraps(func)(wrapper)
wrapper = functools.wraps(func)(wrapper)
wrapper.__doc__ = None
return wrapper

# Basemap recursion fix decorator
def _no_recurse(func):
Expand Down