A uniform plotting module for matplotlib with automatic font detection
Project description
MyPlot
A uniform plotting module for matplotlib with automatic font detection and cross-platform support.
Features
- Uniform Formatting: Consistent plot styling across all your projects
- Automatic Font Detection: Finds and configures Source Han Serif font for Chinese characters
- Cross-Platform Support: Works on Windows, macOS, and Linux
- Easy to Use: Simple decorator interface for creating publication-quality plots
- Built-in Utilities: Radian/degree formatters and other plotting utilities
Installation
pip install -e .
Quick Start
from myplot import myplot, plt, np
@myplot()
def simple_plot():
x = np.linspace(0, 10, 100)
plt.plot(x, np.sin(x))
plt.xlabel('x')
plt.ylabel('sin(x)')
plt.title('Simple Plot')
simple_plot()
Advanced Usage
Custom Figure Size
@myplot(figsize=(8, 6))
def large_plot():
# Your plotting code here
pass
Save Plots Automatically
@myplot(save=True, log=True)
def save_plot():
# Plot will be saved automatically
pass
Using Utilities
from myplot import myUtilities
ax.xaxis.set_major_formatter(myUtilities.radFormatter())
ax.xaxis.set_major_locator(myUtilities.radLocator(np.pi/4))
Requirements
- Python 3.8+
- matplotlib >= 3.5.0
- numpy >= 1.20.0
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
myplot-0.1.0.tar.gz
(189.6 kB
view details)
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 myplot-0.1.0.tar.gz.
File metadata
- Download URL: myplot-0.1.0.tar.gz
- Upload date:
- Size: 189.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1613d8350705e7c352ad4256378a0e2f8ec21de98ac47c35c810ab92b17e36ca
|
|
| MD5 |
8fb515c0c7e1a864a428cba954c95e0a
|
|
| BLAKE2b-256 |
fa27d2269688176dd97e31ae6fae263ab3a0c78347e4ad50c901f10ddf2b8d2b
|
File details
Details for the file myplot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: myplot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7347fed5d8f37dce0b64024e382dcbe456db5cf023ee70b07bc2d663cead28fe
|
|
| MD5 |
073c2532ee105000f54edad1191921a3
|
|
| BLAKE2b-256 |
e8ec27e7036d73c80ac6cb083c5600becced494f0e46e58e1b9513d5fe7ef4c5
|