Skip to content

Commit

Permalink
fixed #1283, format and tick locations for CQT plots (#1290)
Browse files Browse the repository at this point in the history
* fixed #1283, format and tick locations for CQT plots

* updating freetype requirements; regenerated ref images
  • Loading branch information
bmcfee committed Mar 3, 2021
1 parent 8d9a1de commit 20ab762
Show file tree
Hide file tree
Showing 36 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -20,7 +20,7 @@ install:
- "IF NOT EXIST %MINICONDA%\\envs\\test-environment-%PYTHON_VERSION% conda create -q -n test-environment-%PYTHON_VERSION% python=%PYTHON_VERSION% numpy scipy coverage scikit-learn!=0.19.0 numba"
- "activate test-environment-%PYTHON_VERSION%"
- conda info -a
- conda install -c conda-forge ffmpeg
- conda install -c conda-forge ffmpeg "freetype>=2.10"
- pip install -e .[tests]

test_script:
Expand Down
6 changes: 3 additions & 3 deletions librosa/display.py
Expand Up @@ -213,7 +213,7 @@ def __call__(self, x, pos=None):

cents = vmax <= 2 * max(1, vmin)

return core.hz_to_note(int(x), octave=self.octave, cents=cents, key=self.key)
return core.hz_to_note(x, octave=self.octave, cents=cents, key=self.key)


class SvaraFormatter(Formatter):
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def __decorate_axis(axis, ax_type, key="C:maj", Sa=None, mela=None, thaat=None):
axis.set_major_locator(LogLocator(base=2.0, subs=(C_offset,)))
axis.set_minor_formatter(NoteFormatter(key=key, major=False))
axis.set_minor_locator(
LogLocator(base=2.0, subs=2.0 ** (np.arange(1, 12) / 12.0))
LogLocator(base=2.0, subs=C_offset * 2.0 ** (np.arange(1, 12) / 12.0))
)
axis.set_label_text("Note")

Expand All @@ -1085,7 +1085,7 @@ def __decorate_axis(axis, ax_type, key="C:maj", Sa=None, mela=None, thaat=None):
axis.set_major_locator(LogLocator(base=2.0))
axis.set_minor_formatter(LogHzFormatter(major=False))
axis.set_minor_locator(
LogLocator(base=2.0, subs=2.0 ** (np.arange(1, 12) / 12.0))
LogLocator(base=2.0, subs=C_offset * 2.0 ** (np.arange(1, 12) / 12.0))
)
axis.set_label_text("Hz")

Expand Down
Binary file modified tests/baseline_images/test_display/test_abs_input.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_chroma.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_chroma_svara.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_complex_input.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_coords.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_cqt_hz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_cqt_note.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_display_cqt_svara.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_double_chroma.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_fourier_tempo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_sharex_specshow_ms.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_sharex_waveplot_ms.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_specshow_ext_axes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_tempo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_time_scales_auto.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_time_unit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_time_unit_lag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_tonnetz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_waveplot_ext_axes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_waveplot_mono.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_waveplot_stereo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_x_mel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_xaxis_lag_yaxis_none.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_display/test_xaxis_log_yaxis_none.png
Binary file modified tests/baseline_images/test_display/test_xaxis_none_yaxis_frames.png
Binary file modified tests/baseline_images/test_display/test_xaxis_none_yaxis_log.png
Binary file modified tests/baseline_images/test_display/test_xaxis_none_yaxis_time.png
Binary file modified tests/baseline_images/test_display/test_xaxis_time_yaxis_lag.png
Binary file modified tests/baseline_images/test_display/test_xaxis_time_yaxis_none.png
Binary file modified tests/baseline_images/test_display/test_y_mel.png
Binary file modified tests/baseline_images/test_display/test_y_mel_bounded.png

0 comments on commit 20ab762

Please sign in to comment.