Sets matplotlib parameters for scientific publishing.
Project description
Scientific style for matplotlib on import
Install
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.0.tar.gz
(3.0 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.0.tar.gz.
File metadata
- Download URL: pltparams-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3560fff2db7665a3f43e4880053ea00116e81e0f64afd3241d6ca539d834745d
|
|
| MD5 |
68715a41042d0d206964bcf1f58773ef
|
|
| BLAKE2b-256 |
f2effa7f90eea037e3c98c8988b39feb3714b1981219f80cbe65fd8bc96e9bc2
|
File details
Details for the file pltparams-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pltparams-0.1.0-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 |
960ab362cb6adac32ea5668ed4d9ecc9b8daa487293d871428b974568dbffd2d
|
|
| MD5 |
677936070184c2cce52400769cde9975
|
|
| BLAKE2b-256 |
59e1416454e69155249f67e2668040dc2f9b7022e7519c3eab4983cdecb733ea
|