Thanks to visit codestin.com
Credit goes to github.com

Skip to content

'Figure' object has no attribute '_original_dpi' #9040

Closed
@fariza

Description

@fariza

With current master, running any example

python3 histogram_cumulative.py

I get

Traceback (most recent call last):
  File "/home/fariza/workspace/matplotlib/lib/matplotlib/backends/backend_qt5agg.py", line 80, in paintEvent
    self._update_figure_dpi()
  File "/home/fariza/workspace/matplotlib/lib/matplotlib/backends/backend_qt5.py", line 186, in _update_figure_dpi
    dpi = self._dpi_ratio * self.figure._original_dpi
AttributeError: 'Figure' object has no attribute '_original_dpi'
Traceback (most recent call last):
  File "/home/fariza/workspace/matplotlib/lib/matplotlib/backends/backend_qt5agg.py", line 80, in paintEvent
    self._update_figure_dpi()
  File "/home/fariza/workspace/matplotlib/lib/matplotlib/backends/backend_qt5.py", line 186, in _update_figure_dpi
    dpi = self._dpi_ratio * self.figure._original_dpi
AttributeError: 'Figure' object has no attribute '_original_dpi'

It opens the window but the image is black

If I force to use a GTK3 backend I dont get the error and the figure is fine

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions