Skip to content

[BUG] FRC canvas set title error with matplotlib > 3.4 #1525

@csoeller

Description

@csoeller

Describe the bug
With matplotlib > 3.4 you get with Processing>FRC:

 DEBUG:matplotlib.pyplot:Loaded backend WXAgg version unknown.
/Users/csoe002/Documents/src/PYMEsrc/PYME-test-env/build-test-py3.10-conda_tmp/python-microscopy-master
Traceback (most recent call last):
  File "/Users/csoe002/Documents/src/PYMEsrc/PYME-test-env/build-test-py3.10-conda_tmp/python-microscopy-master/PYME/ui/progress.py", line 153, in func
    return fcn(*args, **kwargs)
  File "/Users/csoe002/Documents/src/PYMEsrc/PYME-test-env/build-test-py3.10-conda_tmp/python-microscopy-master/PYME/DSView/modules/coloc.py", line 404, in OnFRC
    correlationCoeffs.fourier_ring_correlation(imA, imB, voxelsize, True)
  File "/Users/csoe002/Documents/src/PYMEsrc/PYME-test-env/build-test-py3.10-conda_tmp/python-microscopy-master/PYME/Analysis/Colocalisation/correlationCoeffs.py", line 143, in fourier_ring_correlation
    fig.canvas.set_window_title('Fourier Ring Correlation')
AttributeError: 'FigureCanvasWxAgg' object has no attribute 'set_window_title'. Did you mean: 'SetWindowStyle'?

To Reproduce
Steps to reproduce the behavior:

  1. Processing>FRC

Reason, see https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.4.0.html#backend-deprecations. Probably error since 3.6.X or so. Relatively easy to fix, it seems, though, see separate PR.

Expected behavior
No error if (do we?) allow matplotlib >3.4. (we should, in any case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions