Skip to content

DOC: improve figures in demo/wp_scalogram.py#769

Merged
rgommers merged 3 commits intoPyWavelets:mainfrom
omersayli:patch-1
Dec 4, 2024
Merged

DOC: improve figures in demo/wp_scalogram.py#769
rgommers merged 3 commits intoPyWavelets:mainfrom
omersayli:patch-1

Conversation

@omersayli
Copy link
Contributor

In the second plot, updated Fs to 512;
ax2.specgram(data, NFFT=64, noverlap=32, Fs=512, cmap=cmap, interpolation='bilinear')

again in the second plot, added aspect='auto', and did corrections to the time (x axis) and y axis (scale) with extent=[0, 1, 1, values.shape[0]]

ax3.imshow(values, origin='lower', extent=[0, 1, 1, values.shape[0]],
interpolation='nearest', aspect='auto')

In the second plot, updated Fs to 512;
`ax2.specgram(data, NFFT=64, noverlap=32, Fs=512, cmap=cmap,
             interpolation='bilinear')`

again in the second plot, added aspect='auto', and did corrections to the time (x axis) and y axis (scale) with `extent=[0, 1, 1, values.shape[0]]`

ax3.imshow(values, origin='lower', extent=[0, 1, 1, values.shape[0]], 
           interpolation='nearest', aspect='auto')
ax3.imshow(values, origin='lower', extent=[0, 1, values.shape[0], 1], 
           interpolation='nearest', aspect='auto')
@omersayli omersayli marked this pull request as draft September 17, 2024 10:34
Figure 2-subplot 2 in this version is compatible with Figure 1-subplot 2 y-axis labels for the wavelet packet names
Copy link
Contributor Author

@omersayli omersayli left a comment

Choose a reason for hiding this comment

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

Figure 1 and 2 have same wavelet packet node labels now, and Fs is added to the Figure 2 spectrogram.

@omersayli omersayli marked this pull request as ready for review September 17, 2024 10:47
@agriyakhetarpal agriyakhetarpal added this to the v1.8.0 milestone Sep 17, 2024
@rgommers rgommers changed the title Update wp_scalogram.py DOC: improve figures in demo/wp_scalogram.py Dec 4, 2024
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

That does look better, thanks @omersayli

@rgommers rgommers merged commit 5c1fb33 into PyWavelets:main Dec 4, 2024
gabalafou pushed a commit to gabalafou/pywt that referenced this pull request Dec 20, 2024
In the second plot, updated Fs to 512;
`ax2.specgram(data, NFFT=64, noverlap=32, Fs=512, cmap=cmap,
             interpolation='bilinear')`

again in the second plot, added aspect='auto', and did corrections to the time (x axis) and y axis (scale) with `extent=[0, 1, 1, values.shape[0]]`

ax3.imshow(values, origin='lower', extent=[0, 1, 1, values.shape[0]], 
           interpolation='nearest', aspect='auto')

Figure 2-subplot 2 in this version is compatible with Figure 1-subplot 2 y-axis labels for the wavelet packet names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants