Skip to content
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

add functionality to plotting #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

# Files as produced by the tests
tests/test_*.png
wavelets/transform.py
wavelets/wavelets.py
4 changes: 2 additions & 2 deletions wavelets/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def coi(self):

return sC, sS

def plot_power(self, ax=None, coi=True):
def plot_power(self, ax=None, coi=True, cmap = 'viridis'):
"""Create a basic wavelet power plot with time on the
x-axis, scale on the y-axis, and a cone of influence
overlaid.
Expand All @@ -586,7 +586,7 @@ def plot_power(self, ax=None, coi=True):
fig, ax = plt.subplots()

Time, Scale = np.meshgrid(self.time, self.scales)
ax.contourf(Time, Scale, self.wavelet_power, 100)
ax.contourf(Time, Scale, self.wavelet_power, 100, cmap = cmap)

ax.set_yscale('log')
ax.grid(True)
Expand Down
2 changes: 1 addition & 1 deletion wavelets/wavelets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import scipy.signal
import scipy.optimize
import scipy.special
from scipy.misc import factorial
from scipy.special import factorial

__all__ = ['Morlet', 'Paul', 'DOG', 'Ricker', 'Marr', 'Mexican_hat']

Expand Down