A wrapper for matplotlib's plt.show() that globally sets figure window size, position, and target screen.
Project description
fixedfig 0.1.4 written by Charlie and his friends 8/22/2025 in Tongji
This module provides an enhanced version of matplotlib's plt.show(), enabling 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:
- Fixed window size and centered display.
- Adaptive window size with top-left corner offset.
- Supports choosing which screen to display on (primary or secondary).
- Compatible with TkAgg. Switch to the TkAgg backend by default on macOS to ensure window control
Usage:
import fixedfig
# Figure window fixed at 800x600 pixels and centered on the primary screen
fixedfig.set_show_config([800, 600], fixed_size=True, screen_index=0)
plt.plot(...)
plt.show()
# Figure window with adaptive size, positioned with an offset of 100x50 pixels on the secondary screen
fixedfig.set_show_config([100, 50], fixed_size=False, screen_index=1)
plt.plot(...)
plt.show()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fixedfig-0.1.4.tar.gz.
File metadata
- Download URL: fixedfig-0.1.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8de772831bffc7e0402b8a26cdadb8a3d12e1f1d2603c51a12b4a6c31e08ce12
|
|
| MD5 |
593fe72e342851f4bc6b1a1602e87f52
|
|
| BLAKE2b-256 |
5cc50df80850c4090ee22697d9e7aac92b345ce474e152f72056c5fd5f3a555a
|
File details
Details for the file fixedfig-0.1.4-py3-none-any.whl.
File metadata
- Download URL: fixedfig-0.1.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38714acef64a5e1e3b5a96606799e3767f5897126972accd8f9f7b85dfde649
|
|
| MD5 |
13d4578f7de1991e35b39313a7ee1c0b
|
|
| BLAKE2b-256 |
f0d253559b92a5080ba2e386d160fa5367f5e9bd909981b87ca09b9f98d6da3f
|