Sets matplotlib parameters for scientific publishing.
Project description
Scientific style for matplotlib on import
Install
Use pip package
pip install pltparams
Or download the repo to your computer
cd path/to/pltparams
pip install .
Usage
import pltparams
sets the appropriate rc params for scientific style.
Alternatively:
import pltparams
pltparams.set_params()
These are the params the package will change, feel free to copy/paste if you prefer that
params = {"ytick.color" : "black",
"xtick.color" : "black",
"axes.labelcolor" : "black",
"axes.edgecolor" : "black",
"text.usetex" : True,
"font.family" : "serif",
"font.serif" : ["Computer Modern Serif"],
"axes.labelsize": 10,
"axes.titlesize": 10,
"xtick.labelsize": 10,
"ytick.labelsize": 10,
"legend.fontsize": 7,
"figure.figsize": figsize/ 25.4,
'figure.constrained_layout.use': True,
'figure.constrained_layout.hspace': 0.01,
'figure.constrained_layout.wspace': 0.01,
'figure.constrained_layout.h_pad': 0.02167,
'figure.constrained_layout.w_pad': 0.02167,
#'figure.autolayout': True,
'lines.linewidth' : 0.5,
'figure.facecolor' : "white",
'axes.facecolor' : "white",
'text.color' : 'black',
'axes.titlecolor' : 'black',
'savefig.facecolor' : 'white',
'savefig.dpi' : '300',
'savefig.format' : 'pdf',
}
plt.rcParams.update(params)
plt.rcParams['figure.constrained_layout.use'] = True
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
pltparams-0.1.2.tar.gz
(3.1 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 pltparams-0.1.2.tar.gz.
File metadata
- Download URL: pltparams-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b201adbe2da3bb1e31235ddfed06bc17113a232ffb1785ed26bd49108ba84464
|
|
| MD5 |
3c0db204429f13cb4f2ad02bd47a07fa
|
|
| BLAKE2b-256 |
9ae7695d2b3216ef704755fc9f06dd59cde327c9d6b00fc05f50b3f433c23397
|
File details
Details for the file pltparams-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pltparams-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4afdc19ec27d0c7e13964730608d4c2f266eb0f6b0edb83392570a9a8ac049a
|
|
| MD5 |
c8053d39530d6e233362d746a28cc9fc
|
|
| BLAKE2b-256 |
1165723f31535083c0b9bd37b2510cf8a7e3d69d1fbb8f29b982762940b21e2e
|