Ignore:
Timestamp:
Dec 18, 2013, 6:42:17 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
6ede3ab
Parents:
e5656036
Message:

python/demos/: minor plot improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_pitch.py

    re5656036 r4f2c28c  
    5757
    5858fig = plt.figure()
     59
    5960ax1 = fig.add_subplot(311)
    6061ax1 = get_waveform_plot(filename, samplerate = samplerate, block_size = hop_s, ax = ax1)
    61 ax1.set_xticklabels([])
     62plt.setp(ax1.get_xticklabels(), visible = False)
     63ax1.set_xlabel('')
    6264
    6365def array_from_text_file(filename, dtype = 'float'):
     
    8890#ax2.axis( ymin = 0.9 * cleaned_pitches.min(), ymax = 1.1 * cleaned_pitches.max() )
    8991#ax2.axis( ymin = 55, ymax = 70 )
    90 ax2.set_xticklabels([])
     92plt.setp(ax2.get_xticklabels(), visible = False)
     93ax2.set_ylabel('f0 (Hz)')
    9194
    9295# plot confidence
     
    97100ax3.plot(times, [tolerance]*len(confidences))
    98101ax3.axis( xmin = times[0], xmax = times[-1])
     102ax3.set_ylabel('condidence')
     103set_xlabels_sample2time(ax3, times[-1], samplerate)
    99104plt.show()
    100 set_xlabels_sample2time(ax3, times[-1], samplerate)
    101 #plt.savefig(os.path.basename(filename) + '.png', dpi=200)
     105#plt.savefig(os.path.basename(filename) + '.svg')
Note: See TracChangeset for help on using the changeset viewer.