Skip to main content

A wrapper for matplotlib's plt.show() that globally sets figure window size, position, and target screen.

Project description

fixedfig.py written by Charlie 8/22/2025

""" fixedfig.py

This module provides a replacement for matplotlib plt.show() that allows global configuration of figure window size, position, and target screen.

Dependencies: pip install matplotlib pip install pyglet==1.5.27 # required for multiscreen support

Features:

  1. Fixed window size and centered display.
  2. Adaptive window size with top-left corner offset.
  3. Supports choosing which screen to display on (primary or secondary).
  4. Compatible with TkAgg. Switch to the TkAgg backend by default on macOS to ensure window control

Usage: import fixedfig # Fixed size 800x600, centered on primary screen fixedfig.set_show_config([800, 600], fixed_size=True, screen_index=0) plt.plot(...) plt.show()

# Adaptive size, offset on secondary screen
fixedfig.set_show_config([100, 50], fixed_size=False, screen_index=1)
plt.plot(...)
plt.show()

"""

Install: ```bash pip install -e plot_utils_pkg/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fixedfig-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fixedfig-0.1.3-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file fixedfig-0.1.3.tar.gz.

File metadata

  • Download URL: fixedfig-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for fixedfig-0.1.3.tar.gz
Algorithm Hash digest
SHA256 eef41068c775d5a6a1a75c041b248c66fefdac5923a5617a84aa2e8ba33ad88f
MD5 a427c8bd6af3d29bf7dd6ca2a929d7a7
BLAKE2b-256 2844ecd9a62e3b6cf513116a875822df56fc3e213ba74e69a0cc17745d2b42ef

See more details on using hashes here.

File details

Details for the file fixedfig-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: fixedfig-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for fixedfig-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5610bdb8f186ac21298972cc5fb1b258748759091d962ca9a519d1b6ac2a7165
MD5 300ff145d5f12d5684733f9e43d91254
BLAKE2b-256 913c74a1313e5dfe6eaeec64bada8349749a938eb0b63aa008f424a56c38b7e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page