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.1.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.1.tar.gz.
File metadata
- Download URL: pltparams-0.1.1.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 |
55983007d2db967c45040a81f00ba184c256128c162305505b214522f55caac7
|
|
| MD5 |
bc3e05d67782a231b9e88c3950df37a5
|
|
| BLAKE2b-256 |
2e47d00311c73c1ef464e39bfff0d90ab2a537146700317e504b343f722e4fa1
|
File details
Details for the file pltparams-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pltparams-0.1.1-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 |
37efda1f1687562262c9ed968a2296fc02c056613184959a5b33e2f7e7d6bf0f
|
|
| MD5 |
870cc743d05fab4da0e2657586e106f7
|
|
| BLAKE2b-256 |
60fd2adc4052e26388bb2d0dd0b8cc9084bfaac4784e8775e89105a16f81ad25
|