Changeset 4f2c28c for python


Ignore:
Timestamp:
Dec 18, 2013, 6:42:17 AM (11 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

Location:
python/demos
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_mel-energy.py

    re5656036 r4f2c28c  
    6262        ax.yaxis.set_visible(False)
    6363        ax.axis(xmax = all_desc_times[-1], xmin = all_desc_times[0])
    64         ax.annotate('band %d' % i, xy=(-10, 10),  xycoords='axes points',
     64        ax.annotate('band %d' % i, xy=(-10, 0),  xycoords='axes points',
    6565                horizontalalignment='right', verticalalignment='bottom',
     66                size = 'xx-small',
    6667                )
    6768    set_xlabels_sample2time( ax, all_desc_times[-1], samplerate)
  • 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')
  • python/demos/demo_specdesc.py

    re5656036 r4f2c28c  
    7272        ax.yaxis.set_visible(False)
    7373        ax.axis(xmax = all_desc_times[-1], xmin = all_desc_times[0])
    74         ax.annotate(method, xy=(-10, 10),  xycoords='axes points',
     74        ax.annotate(method, xy=(-10, 0),  xycoords='axes points',
    7575                horizontalalignment='right', verticalalignment='bottom',
    7676                )
Note: See TracChangeset for help on using the changeset viewer.