Skip to content

[Bug]: pickling and unpickling hidpi a qt figure that has been already shown doubles its physical size #27224

@anntzer

Description

@anntzer

Bug summary

All's in the title.

Code for reproduction

# Run this from a computer with a hidpi display.
from pylab import *; import pickle
fig = figure(figsize=(5, 4))
show(block=False)
copy = pickle.loads(pickle.dumps(fig))
show(block=False)
print(fig.get_size_inches(), c.get_size_inches())

Actual outcome

[5. 4.] [10. 8.]
... and the second figure is indeed twice bigger.

Expected outcome

[5. 4.] [5. 4.]
... and two figures with the same size.

Additional information

Bisects to #23476.

Operating system

macOS

Matplotlib Version

3.8

Matplotlib Backend

qtagg

Python version

3.12

Jupyter version

ENOSUCHLIB

Installation

git checkout

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy