mirror of
https://codeberg.org/Yael-II/Matplotlib-Style.git
synced 2026-03-15 13:46:28 +01:00
Compare commits
6 Commits
c655555c3c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ad0303a75 | ||
|
|
318f93e51d | ||
|
|
911c925686 | ||
|
|
80069bb602 | ||
|
|
eaa1c17aeb | ||
|
|
226580399b |
112
.gitignore
vendored
Normal file
112
.gitignore
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
# Specific files
|
||||
old/
|
||||
|
||||
# Os generated files
|
||||
## Linux
|
||||
.Trash-*
|
||||
|
||||
## MacOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
._*
|
||||
|
||||
## Windows
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
Desktop.ini
|
||||
desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# temporary or log(s) files and directories
|
||||
*.tmp
|
||||
*.log
|
||||
*.logs
|
||||
tmp/
|
||||
log/
|
||||
logs/
|
||||
|
||||
# Python
|
||||
Build/
|
||||
build/
|
||||
venv/
|
||||
.venv/
|
||||
__pycache__/
|
||||
eggs/
|
||||
.eggs/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
dist/
|
||||
*.egg-info/
|
||||
*.egg
|
||||
*.pyc
|
||||
*.pyd
|
||||
*.pyo
|
||||
*.pyz
|
||||
*.so
|
||||
.installed.cfg
|
||||
|
||||
|
||||
|
||||
# LaTeX
|
||||
Build/
|
||||
build/
|
||||
*.acn
|
||||
*.acr
|
||||
*.alg
|
||||
*.aux
|
||||
*.bak
|
||||
*.bbl
|
||||
*.bcf
|
||||
*.blg
|
||||
*.brf
|
||||
*.bst
|
||||
*.dvi
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
*.glg
|
||||
*.glo
|
||||
*.gls
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
*.ist
|
||||
*.lof
|
||||
*.log
|
||||
*.lol
|
||||
*.lot
|
||||
*.maf
|
||||
*.mtc
|
||||
*.mtc1
|
||||
*.nav
|
||||
*.nlo
|
||||
*.nls
|
||||
*.out
|
||||
*.pyg
|
||||
*.run.xml
|
||||
*.snm
|
||||
*.synctex.gz
|
||||
*.tex.backup
|
||||
*.tex~
|
||||
*.thm
|
||||
*.toc
|
||||
*.vrb
|
||||
*.xdy
|
||||
*.xml
|
||||
*blx.bib
|
||||
.bak
|
||||
.mtc
|
||||
40
README.md
40
README.md
@@ -1,18 +1,30 @@
|
||||
<!--[TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS-->
|
||||
```diff
|
||||
! [TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS
|
||||
```
|
||||
# Python Matplotlib Style
|
||||
## [FR] Utilisation
|
||||
Le style peut être utilisé avec `plt.style.use("CHEMIN/REPERTOIRE/YII")`. Ce style est prévu pour générer des figures pouvant être intégrées dans un document LaTeX (police Latin Modern Roman) au format A4 avec :
|
||||
- une colonne et des marges de `3 cm` de chaque côté (`_1`)
|
||||
- deux colonnes avec un séparation de `1 cm` et des marges de `2 cm` de chaque côté (`_2`)
|
||||
- beamer au format 3:2 (`_beamer`)
|
||||
- un style plus simple (sans LaTeX) et une police monospace (Latin Modern Mono; `_light`)
|
||||
|
||||
plus d'informations: https://matplotlib.org/stable/users/explain/customizing.html#customizing-with-style-sheets
|
||||
Author: Moussouni, Yaël (PhD student; yael.moussouni@astro.unistra.fr)\
|
||||
Institution: Université de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
|
||||
## [EN] Usage
|
||||
The style can be used with `plt.style.use("PATH/DIRECTORY/YII")`. This style has been made to generate figures that can be integrated in LaTeX documents, with:
|
||||
- one column and `3 cm` margins on each side (`_1`)
|
||||
- two columns with a `1 cm` separation and `2 cm` margins (`_2`)
|
||||
- beamers with a 3:2 format (`_beamer`)
|
||||
- a more simple style (without LaTeX) and a monospace font (Latin Modern Mono; `_light`)
|
||||
Date: 2025-11-21
|
||||
|
||||
more informations: https://matplotlib.org/stable/users/explain/customizing.html#customizing-with-style-sheets
|
||||
## Requirements
|
||||
|
||||
- Python (>3.11)
|
||||
|
||||
## WARNING: WORK IN PROGRESS
|
||||
|
||||
**The current version of the scripts in this repository is in development. Please use with extreme caution, significant and reliable results cannot be guaranteed.**
|
||||
|
||||
## Licence
|
||||
|
||||
**MSc2 Internship: SMACS Cluster**
|
||||
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/.
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: True
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: True
|
||||
xtick.minor.bottom: True
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: True
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: True
|
||||
ytick.minor.right: True
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 5.9, 3.9
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: serif
|
||||
font.serif: Latin Modern Roman
|
||||
font.size: 9.0
|
||||
text.usetex: true
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
|
||||
|
||||
### LaTeX
|
||||
text.latex.preamble: \input{~/.config/matplotlib/stylelib/yii_plot.tex}
|
||||
@@ -1,78 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: True
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: True
|
||||
xtick.minor.bottom: True
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: True
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: True
|
||||
ytick.minor.right: True
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 3.1, 3.9
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: serif
|
||||
font.serif: Latin Modern Roman
|
||||
font.size: 9.0
|
||||
text.usetex: true
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
|
||||
|
||||
### LaTeX
|
||||
text.latex.preamble: \input{~/.config/matplotlib/stylelib/yii_plot.tex}
|
||||
@@ -1,78 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: True
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: True
|
||||
xtick.minor.bottom: True
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: True
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: True
|
||||
ytick.minor.right: True
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 4.5, 2.05
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: serif
|
||||
font.serif: Latin Modern Roman
|
||||
font.size: 9.0
|
||||
text.usetex: true
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
|
||||
|
||||
### LaTeX
|
||||
text.latex.preamble: \input{~/.config/matplotlib/stylelib/yii_plot.tex}
|
||||
@@ -1,79 +0,0 @@
|
||||
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: True
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: True
|
||||
xtick.minor.bottom: True
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: True
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: True
|
||||
ytick.minor.right: True
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 2.25, 2.05
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: serif
|
||||
font.serif: Latin Modern Roman
|
||||
font.size: 9.0
|
||||
text.usetex: true
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
|
||||
|
||||
### LaTeX
|
||||
text.latex.preamble: \input{~/.config/matplotlib/stylelib/yii_plot.tex}
|
||||
@@ -1,74 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: False
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: False
|
||||
xtick.minor.bottom: False
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: False
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: False
|
||||
ytick.minor.right: False
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 4.3, 2.3
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: monospace
|
||||
font.serif: Latin Modern Mono
|
||||
font.size: 9.0
|
||||
text.usetex: False
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
@@ -1,74 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: False
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: False
|
||||
xtick.minor.bottom: False
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: False
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: False
|
||||
ytick.minor.right: False
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 2.1, 2.3
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: monospace
|
||||
font.serif: Latin Modern Mono
|
||||
font.size: 9.0
|
||||
text.usetex: False
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
@@ -1,74 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: False
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: False
|
||||
xtick.minor.bottom: False
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: False
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: False
|
||||
ytick.minor.right: False
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 5.9, 3.9
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: monospace
|
||||
font.serif: Latin Modern Mono
|
||||
font.size: 9.0
|
||||
text.usetex: False
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
@@ -1,74 +0,0 @@
|
||||
### Axes
|
||||
axes.titlesize : large
|
||||
axes.labelsize : large
|
||||
|
||||
### Lines
|
||||
lines.linewidth : 1.0
|
||||
hatch.linewidth: 0.25
|
||||
lines.markersize: 5
|
||||
|
||||
patch.antialiased : True
|
||||
|
||||
### Ticks
|
||||
xtick.top: True
|
||||
xtick.bottom: True
|
||||
xtick.major.size: 4.0
|
||||
xtick.minor.size: 2.0
|
||||
xtick.major.width: 0.5
|
||||
xtick.minor.width: 0.5
|
||||
xtick.direction: in
|
||||
xtick.minor.visible: False
|
||||
xtick.major.top: True
|
||||
xtick.major.bottom: True
|
||||
xtick.minor.top: False
|
||||
xtick.minor.bottom: False
|
||||
xtick.major.pad: 5.0
|
||||
xtick.minor.pad: 5.0
|
||||
ytick.labelsize: large
|
||||
|
||||
ytick.left: True
|
||||
ytick.right: True
|
||||
ytick.major.size: 4.0
|
||||
ytick.minor.size: 2.0
|
||||
ytick.major.width: 0.5
|
||||
ytick.minor.width: 0.5
|
||||
ytick.direction: in
|
||||
ytick.minor.visible: False
|
||||
ytick.major.left: True
|
||||
ytick.major.right: True
|
||||
ytick.minor.left: False
|
||||
ytick.minor.right: False
|
||||
ytick.major.pad: 5.0
|
||||
ytick.minor.pad: 5.0
|
||||
xtick.labelsize: large
|
||||
|
||||
### Legend
|
||||
legend.frameon: True
|
||||
legend.fontsize: 9.0
|
||||
|
||||
### Figure size
|
||||
figure.figsize: 3.1, 3.9
|
||||
figure.subplot.left: 0.1
|
||||
figure.subplot.bottom: 0.175
|
||||
figure.subplot.top: 0.90
|
||||
figure.subplot.right: 0.95
|
||||
figure.autolayout: True
|
||||
figure.dpi: 150
|
||||
|
||||
### Fonts
|
||||
font.family: monospace
|
||||
font.serif: Latin Modern Mono
|
||||
font.size: 9.0
|
||||
text.usetex: False
|
||||
|
||||
### Saving figures
|
||||
savefig.format: pdf
|
||||
savefig.dpi: 300
|
||||
savefig.pad_inches: 0
|
||||
path.simplify: True
|
||||
|
||||
### Cycler
|
||||
axes.prop_cycle: cycler(color=['06518E','E8BD0F','3B795E','ED1C24','C95BCF','009EDB'])
|
||||
|
||||
### Colormap
|
||||
image.cmap: cividis
|
||||
28
activate.sh
Executable file
28
activate.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# [TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS
|
||||
# Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr)
|
||||
# Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
||||
# de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
# Date: 2025-02-10
|
||||
#
|
||||
# Licence:
|
||||
# MSc2 Internship: SMACS Cluster
|
||||
# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
|
||||
#
|
||||
# activate.sh
|
||||
# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see www.gnu.org/licenses/.
|
||||
|
||||
source venv/bin/activate
|
||||
55
pyproject.toml
Normal file
55
pyproject.toml
Normal file
@@ -0,0 +1,55 @@
|
||||
# [TLP:WHITE] FROM 2025-11-21
|
||||
#
|
||||
# Author: Moussouni, Yaël (PhD student; yael.moussouni@astro.unistra.fr)
|
||||
# Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
||||
# de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
# Date: 2025-11-21
|
||||
#
|
||||
# Licence:
|
||||
# Python Matplotlib Style
|
||||
# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
#
|
||||
# pyproject.toml
|
||||
# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
[project]
|
||||
name = "manchot_plot"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
{ name="Moussouni, Yaël", email="yael.moussouni@astro.unistra.fr" },
|
||||
]
|
||||
description = "Python Matplotlib Style"
|
||||
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
dynamic = ["dependencies"]
|
||||
license = "GPL-3.0-or-later"
|
||||
license-files = ["COPYING.txt"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://codeberg.org/Yael-II/Matplotlib-Style/"
|
||||
Issues = "https://codeberg.org/Yael-II/Matplotlib-Style/issues/"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=80.9.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
dependencies = {file = ["requirements.txt"]}
|
||||
12
requirements.txt
Normal file
12
requirements.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
cmcrameri==1.9
|
||||
contourpy==1.3.3
|
||||
cycler==0.12.1
|
||||
fonttools==4.60.1
|
||||
kiwisolver==1.4.9
|
||||
matplotlib==3.10.7
|
||||
numpy==2.3.5
|
||||
packaging==25.0
|
||||
pillow==12.0.0
|
||||
pyparsing==3.2.5
|
||||
python-dateutil==2.9.0.post0
|
||||
six==1.17.0
|
||||
33
src/manchot_plot/__init__.py
Normal file
33
src/manchot_plot/__init__.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
#[TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS
|
||||
"""
|
||||
__init__.py
|
||||
|
||||
@ Author: Moussouni, Yaël (PhD student; yael.moussouni@astro.unistra.fr)
|
||||
@ Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
||||
de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
@ Date: 2025-11-21
|
||||
|
||||
Licence:
|
||||
Python Matplotlib Style
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
__init__.py
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see www.gnu.org/licenses/.
|
||||
"""
|
||||
from .manchot_plot import *
|
||||
from .colours import *
|
||||
|
||||
93
src/manchot_plot/colours.py
Normal file
93
src/manchot_plot/colours.py
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
#!/usr/bin/env python
|
||||
#[TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS
|
||||
"""
|
||||
manchot_plot.py
|
||||
|
||||
@ Author: Moussouni, Yaël (PhD student; yael.moussouni@astro.unistra.fr)
|
||||
@ Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
||||
de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
@ Date: 2025-11-21
|
||||
|
||||
Licence:
|
||||
Python Matplotlib Style
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
manchot_plot.py
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see www.gnu.org/licenses/.
|
||||
"""
|
||||
|
||||
# Default palette
|
||||
colour_blue = "#113847"
|
||||
colour_light_blue = "#88AAC6"
|
||||
colour_red = "#4D251D"
|
||||
colour_yellow = "#BD9A5A"
|
||||
colour_green = "#3F4738"
|
||||
colour_violet = "#5F2C51"
|
||||
colour_cyan = "#1D627E"
|
||||
colour_orange = "#9B4D40"
|
||||
|
||||
colour_purple = colour_violet
|
||||
|
||||
# Bright palette
|
||||
bright_white = "#DDDDDD"
|
||||
bright_black = "#121212"
|
||||
|
||||
bright_blue = "#06518E"
|
||||
bright_light_blue = "#009EDB"
|
||||
bright_red = "#ED1C24"
|
||||
bright_yellow = "#E8BD0F"
|
||||
bright_green = "#3B795E"
|
||||
bright_violet = "#C95BCF"
|
||||
bright_cyan = "#216576"
|
||||
bright_light_cyan = "#1E8C9D"
|
||||
bright_orange = "#EB6D1A"
|
||||
bright_purple = bright_violet
|
||||
|
||||
# Blue palette
|
||||
blues_1 = "#D6E3EC"
|
||||
blues_2 = "#88AAC6" # light blue
|
||||
blues_3 = "#4A5B65"
|
||||
blues_4 = "#21475A"
|
||||
blues_5 = "#113847" # blue
|
||||
|
||||
# Grey palette
|
||||
greys_1 = "#CED8DB" # white
|
||||
greys_2 = "#A4B0B4"
|
||||
greys_3 = "#7A888C" # grey
|
||||
greys_4 = "#596569"
|
||||
greys_5 = "#171F22" # black
|
||||
|
||||
colour_white = greys_1
|
||||
colour_grey = greys_3
|
||||
colour_black = greys_5
|
||||
|
||||
# bluegreen palette
|
||||
bluegreen_1 = "#C2D0DB"
|
||||
bluegreen_2 = "#6C8B90"
|
||||
bluegreen_3 = "#4D6C5B"
|
||||
bluegreen_4 = "#3A5662"
|
||||
bluegreen_5 = "#31504B"
|
||||
|
||||
# tree palette
|
||||
tree_1 = "#CFDED7"
|
||||
tree_2 = "#806655" # brown
|
||||
tree_3 = "#3F4738" # green
|
||||
tree_4 = "#113847" # blue
|
||||
tree_5 = "#122921" # dark green
|
||||
|
||||
colour_brown = tree_2
|
||||
colour_dark_green = tree_5
|
||||
129
src/manchot_plot/manchot_plot.py
Normal file
129
src/manchot_plot/manchot_plot.py
Normal file
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env python
|
||||
#[TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS
|
||||
"""
|
||||
manchot_plot.py
|
||||
|
||||
@ Author: Moussouni, Yaël (PhD student; yael.moussouni@astro.unistra.fr)
|
||||
@ Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
||||
de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
||||
@ Date: 2025-11-21
|
||||
|
||||
Licence:
|
||||
Python Matplotlib Style
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
manchot_plot.py
|
||||
Copyright (C) 2025 Yaël Moussouni (yael.moussouni@astro.unistra.fr)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see www.gnu.org/licenses/.
|
||||
"""
|
||||
import os
|
||||
|
||||
import matplotlib as mpl
|
||||
import numpy as np
|
||||
import colours as c
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from cycler import cycler
|
||||
|
||||
cm = 0.3937 # in/cm
|
||||
|
||||
class ManchotRC:
|
||||
def __init__(self):
|
||||
self.context = {}
|
||||
|
||||
# Paper
|
||||
self.paper = (21*cm, 29.7*cm)
|
||||
self.margin_left = 3*cm
|
||||
self.margin_right = 3*cm
|
||||
self.margin_cols = 0*cm
|
||||
self.n_cols = 1
|
||||
self.aspect = 3/2
|
||||
|
||||
# Colours
|
||||
self.colour_fg = "#000000"
|
||||
self.colour_bg = "#FFFFFF"
|
||||
self.colours = [c.bright_blue, c.bright_yellow]
|
||||
|
||||
self.axes_facecolor = self.colour_bg
|
||||
self.axes_edgecolor = self.colour_fg
|
||||
self.axes_labelcolor = self.colour_fg
|
||||
self.axes_prop_cycle = cycler(color=self.colours)
|
||||
|
||||
# Figure
|
||||
self.figure_dpi = 150
|
||||
self.savefig_dpi = 300
|
||||
self.savefig_transparent = True
|
||||
|
||||
# Font
|
||||
self.font_family = "serif"
|
||||
self.font_serif = "Latin Modern Roman"
|
||||
self.font_size = 10
|
||||
|
||||
# Text / LaTeX
|
||||
self.text_usetex = True
|
||||
self.latex_preamble = ""
|
||||
|
||||
# Axes
|
||||
|
||||
self.axes_titlesize = "large"
|
||||
self.axes_labelsize = "medium"
|
||||
|
||||
# Compute
|
||||
self._compute()
|
||||
return None
|
||||
|
||||
def _compute(self):
|
||||
# Paper
|
||||
margin = self.margin_left + self.margin_right \
|
||||
+ (self.n_cols - 1) * self.margin_cols
|
||||
figsize_x = self.paper[0]/self.n_cols - margin
|
||||
figsize_y = figsize_x / self.aspect
|
||||
|
||||
# Colours
|
||||
self.context["axes.facecolor"] = self.axes_facecolor
|
||||
self.context["axes.edgecolor"] = self.axes_edgecolor
|
||||
self.context["axes.labelcolor"] = self.axes_labelcolor
|
||||
self.context["axes.prop_cycle"] = self.axes_prop_cycle
|
||||
|
||||
# Figure
|
||||
self.context["figure.figsize"] = (figsize_x, figsize_y)
|
||||
self.context["figure.dpi"] = self.figure_dpi
|
||||
self.context["savefig.dpi"] = self.savefig_dpi
|
||||
self.context["savefig.transparent"] = self.savefig_transparent
|
||||
|
||||
# Font
|
||||
self.context["font.family"] = self.font_family
|
||||
self.context["font.serif"] = self.font_serif
|
||||
self.context["font.size"] = self.font_size
|
||||
|
||||
# Text / LaTeX
|
||||
self.context["text.usetex"] = self.text_usetex
|
||||
self.context["text.latex.preamble"] = self.latex_preamble
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
rc = ManchotRC()
|
||||
|
||||
print(rc.context)
|
||||
|
||||
with plt.style.context(rc.context):
|
||||
fig, ax = plt.subplots(1)
|
||||
ax.plot([0,1,2,3,4], [2,1,4,3,6])
|
||||
ax.plot([0,1,2,3,4], [4,3,1,2,4])
|
||||
ax.set_xlabel("$x\\ \\mathrm{[cm]}$")
|
||||
ax.set_ylabel("$y\\ \\mathrm{[cm]}$")
|
||||
plt.show()
|
||||
3
tests/test.py
Normal file
3
tests/test.py
Normal file
@@ -0,0 +1,3 @@
|
||||
import manchot_plot
|
||||
|
||||
print(manchot_plot.a)
|
||||
324
yii_plot.tex
324
yii_plot.tex
@@ -1,324 +0,0 @@
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{textgreek}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{xparse}
|
||||
\usepackage{esint}
|
||||
\usepackage{physics}
|
||||
|
||||
\renewcommand{\oiint}{\varoiint} % integral symbol
|
||||
|
||||
|
||||
\DeclareSymbolFont{yiilm}{T1}{lmr}{m}{n}
|
||||
|
||||
\DeclareMathSymbol{\Alpha}{7}{yiilm}{"41}
|
||||
\DeclareMathSymbol{\Beta}{7}{yiilm}{"42}
|
||||
\DeclareMathSymbol{\Epsilon}{7}{yiilm}{"45}
|
||||
\DeclareMathSymbol{\Zeta}{7}{yiilm}{"5A}
|
||||
\DeclareMathSymbol{\Eta}{7}{yiilm}{"48}
|
||||
\DeclareMathSymbol{\Iota}{7}{yiilm}{"49}
|
||||
\DeclareMathSymbol{\Kappa}{7}{yiilm}{"4B}
|
||||
\DeclareMathSymbol{\Mu}{7}{yiilm}{"4D}
|
||||
\DeclareMathSymbol{\Nu}{7}{yiilm}{"4E}
|
||||
\DeclareMathSymbol{\Omicron}{7}{yiilm}{"4F}
|
||||
\DeclareMathSymbol{\Rho}{7}{yiilm}{"50}
|
||||
\DeclareMathSymbol{\Tau}{7}{yiilm}{"54}
|
||||
\DeclareMathSymbol{\Chi}{7}{yiilm}{"58}
|
||||
|
||||
\let\yiiepsilon\epsilon
|
||||
\let\epsilon\varepsilon
|
||||
\let\varepsilon\yiiepsilon
|
||||
|
||||
\let\Varepsilon\Epsilon
|
||||
\let\Vartheta\Theta
|
||||
\let\Varpi\Pi
|
||||
\let\Varrho\Rho
|
||||
\let\Varphi\Phi
|
||||
|
||||
\let\textvarepsilon\straightepsilon
|
||||
\let\textvarrho\textrho
|
||||
\let\textvarphi\textphi
|
||||
\let\textphi\straightphi
|
||||
\let\textvartheta\texttheta
|
||||
\let\texttheta\straighttheta
|
||||
\let\textVarepsilon\textEpsilon
|
||||
\let\textVartheta\textTheta
|
||||
\let\textVarrho\textRho
|
||||
\let\textVarphi\textPhi
|
||||
|
||||
\newcommand{\omicron}{\mathit{o}}
|
||||
\renewcommand{\textomicron}{o}
|
||||
\renewcommand{\textOmicron}{O}
|
||||
|
||||
|
||||
\newcommand{\mathalpha}{\text{\textalpha}}
|
||||
\newcommand{\mathbeta}{\text{\textbeta}}
|
||||
\newcommand{\mathgamma}{\text{\textgamma}}
|
||||
\newcommand{\mathdelta}{\text{\textdelta}}
|
||||
\newcommand{\mathepsilon}{\text{\textepsilon}}
|
||||
\newcommand{\mathvarepsilon}{\text{\textvarepsilon}}
|
||||
\newcommand{\mathzeta}{\text{\textzeta}}
|
||||
\newcommand{\matheta}{\text{\texteta}}
|
||||
\newcommand{\maththeta}{\text{\texttheta}}
|
||||
\newcommand{\mathvartheta}{\text{\textvartheta}}
|
||||
\newcommand{\mathiota}{\text{\textiota}}
|
||||
\newcommand{\mathkappa}{\text{\textkappa}}
|
||||
\newcommand{\mathlambda}{\text{\textlambda}}
|
||||
\newcommand{\mathmu}{\text{\textmu}}
|
||||
\newcommand{\mathnu}{\text{\textnu}}
|
||||
\newcommand{\mathxi}{\text{\textxi}}
|
||||
\newcommand{\mathomicron}{\text{\textomicron}}
|
||||
\newcommand{\mathpi}{\text{\textpi}}
|
||||
\newcommand{\mathrho}{\text{\textrho}}
|
||||
\newcommand{\mathvarrho}{\text{\textvarrho}}
|
||||
\newcommand{\mathsigma}{\text{\textsigma}}
|
||||
\newcommand{\mathtau}{\text{\texttau}}
|
||||
\newcommand{\mathupsilon}{\text{\textupsilon}}
|
||||
\newcommand{\mathphi}{\text{\textphi}}
|
||||
\newcommand{\mathvarphi}{\text{\textvarphi}}
|
||||
\newcommand{\mathchi}{\text{\textchi}}
|
||||
\newcommand{\mathpsi}{\text{\textpsi}}
|
||||
\newcommand{\mathomega}{\text{\textomega}}
|
||||
\newcommand{\mathAlpha}{\text{\textAlpha}}
|
||||
\newcommand{\mathBeta}{\text{\textBeta}}
|
||||
\newcommand{\mathGamma}{\text{\textGamma}}
|
||||
\newcommand{\mathDelta}{\text{\textDelta}}
|
||||
\newcommand{\mathEpsilon}{\text{\textEpsilon}}
|
||||
\newcommand{\mathVarepsilon}{\text{\textVarepsilon}}
|
||||
\newcommand{\mathZeta}{\text{\textZeta}}
|
||||
\newcommand{\mathEta}{\text{\textEta}}
|
||||
\newcommand{\mathTheta}{\text{\textTheta}}
|
||||
\newcommand{\mathVartheta}{\text{\textVartheta}}
|
||||
\newcommand{\mathIota}{\text{\textIota}}
|
||||
\newcommand{\mathKappa}{\text{\textKappa}}
|
||||
\newcommand{\mathLambda}{\text{\textLambda}}
|
||||
\newcommand{\mathMu}{\text{\textMu}}
|
||||
\newcommand{\mathNu}{\text{\textNu}}
|
||||
\newcommand{\mathXi}{\text{\textXi}}
|
||||
\newcommand{\mathOmicron}{\text{\textOmicron}}
|
||||
\newcommand{\mathPi}{\text{\textPi}}
|
||||
\newcommand{\mathRho}{\text{\textRho}}
|
||||
\newcommand{\mathVarrho}{\text{\textVarrho}}
|
||||
\newcommand{\mathSigma}{\text{\textSigma}}
|
||||
\newcommand{\mathTau}{\text{\textTau}}
|
||||
\newcommand{\mathUpsilon}{\text{\textUpsilon}}
|
||||
\newcommand{\mathPhi}{\text{\textPhi}}
|
||||
\newcommand{\mathVarphi}{\text{\textVarphi}}
|
||||
\newcommand{\mathChi}{\text{\textChi}}
|
||||
\newcommand{\mathPsi}{\text{\textPsi}}
|
||||
\newcommand{\mathOmega}{\text{\textOmega}}
|
||||
|
||||
\let\micro\mathmu
|
||||
% Commands
|
||||
%% vectors
|
||||
\let\vect\vb
|
||||
\let\rot\curl
|
||||
|
||||
%% set and spaces
|
||||
\newcommand{\set}[1]{\mathbf{#1}} % set (in bold)
|
||||
\newcommand{\spc}[1]{\mathcal{#1}} % space (in cal)
|
||||
\newcommand{\N}{\set{N}}
|
||||
\newcommand{\Z}{\set{Z}}
|
||||
\newcommand{\D}{\set{D}}
|
||||
\newcommand{\Q}{\set{Q}}
|
||||
\newcommand{\R}{\set{R}}
|
||||
\newcommand{\C}{\set{C}}
|
||||
\newcommand{\K}{\set{K}}
|
||||
|
||||
\newcommand{\intqty}[1]{\left[\!\left[{#1}\right]\!\right]}
|
||||
|
||||
%% quantities
|
||||
\newcommand{\lag}{\mathcal{L}}
|
||||
\newcommand{\ham}{\mathcal{H}}
|
||||
\newcommand{\mom}{\mathcal{M}}
|
||||
|
||||
%% symbols
|
||||
\newcommand{\odeg}{\text{°}}
|
||||
\newcommand{\omin}{\text{'}}
|
||||
\newcommand{\osec}{\text{''}}
|
||||
\let\transp\top
|
||||
\let\Sun\odot
|
||||
\let\Earth\oplus
|
||||
|
||||
%% Operators
|
||||
\DeclareMathOperator{\Sp}{Sp}
|
||||
\DeclareMathOperator{\Image}{Im}
|
||||
\DeclareMathOperator{\Ker}{Ker}
|
||||
\DeclareMathOperator{\arctantwo}{arctan2}
|
||||
\DeclareMathOperator{\FT}{FT}
|
||||
\let\lap\laplacian % Physics alias
|
||||
|
||||
%% Probability
|
||||
\DeclareMathOperator{\p}{\mathbb{P}}
|
||||
\DeclareMathOperator{\pO}{\mathbb{O}}
|
||||
\DeclareMathOperator{\pF}{\mathbb{F}}
|
||||
\DeclareMathOperator{\pdf}{\mathbb{F'}}
|
||||
\DeclareMathOperator{\pE}{\mathbb{E}}
|
||||
\DeclareMathOperator{\pV}{\mathbb{V}}
|
||||
\DeclareMathOperator{\normal}{\mathcal{N}}
|
||||
\DeclareMathOperator{\binomial}{\mathcal{B}}
|
||||
\DeclareMathOperator{\poisson}{\mathcal{P}}
|
||||
|
||||
%% Constants
|
||||
\newcommand{\im}{\mathrm{i}}
|
||||
\newcommand{\jm}{\mathrm{j}}
|
||||
\newcommand{\e}{\mathrm{e}}
|
||||
\newcommand{\NA}{\mathcal{N}_\mathrm{A}}
|
||||
\newcommand{\kB}{k_\mathrm{B}}
|
||||
\newcommand{\muB}{\mu_\mathrm{B}}
|
||||
\newcommand{\cst}{\mathrm{cst}}
|
||||
\newcommand{\uma}{\mathrm{u}}
|
||||
|
||||
%% Unitary vectors
|
||||
\newcommand{\ux}{\vu u_x}
|
||||
\newcommand{\uy}{\vu u_y}
|
||||
\newcommand{\uz}{\vu u_z}
|
||||
\newcommand{\ur}{\vu u_r}
|
||||
\newcommand{\un}{\vu u_n}
|
||||
\newcommand{\ut}{\vu u_t}
|
||||
\newcommand{\urho}{\vu u_\rho}
|
||||
\newcommand{\uvarrho}{\vu u_\varrho}
|
||||
\newcommand{\utheta}{\vu u_\theta}
|
||||
\newcommand{\uvartheta}{\vu u_\vartheta}
|
||||
\newcommand{\uphi}{\vu u_\phi}
|
||||
\newcommand{\uvarphi}{\vu u_\varphi}
|
||||
|
||||
\newcommand{\ex}{\vu e_x}
|
||||
\newcommand{\ey}{\vu e_y}
|
||||
\newcommand{\ez}{\vu e_z}
|
||||
\newcommand{\er}{\vu e_r}
|
||||
\newcommand{\en}{\vu e_n}
|
||||
\newcommand{\et}{\vu e_t}
|
||||
\newcommand{\erho}{\vu e_\rho}
|
||||
\newcommand{\evarrho}{\vu e_\varrho}
|
||||
\newcommand{\etheta}{\vu e_\theta}
|
||||
\newcommand{\evartheta}{\vu e_\vartheta}
|
||||
\newcommand{\ephi}{\vu e_\phi}
|
||||
\newcommand{\evarphi}{\vu e_\varphi}
|
||||
|
||||
\newcommand{\vux}{\vu x}
|
||||
\newcommand{\vuy}{\vu y}
|
||||
\newcommand{\vuz}{\vu z}
|
||||
\newcommand{\vur}{\vu r}
|
||||
\newcommand{\vun}{\vu n}
|
||||
\newcommand{\vut}{\vu t}
|
||||
\newcommand{\vurho}{\vu{\boldsymbol{\rho}}}
|
||||
\newcommand{\vuvarrho}{\vu{\boldsymbol{\varrho}}}
|
||||
\newcommand{\vutheta}{\vu{\boldsymbol{\theta}}}
|
||||
\newcommand{\vuvartheta}{\vu{\boldsymbol{\vartheta}}}
|
||||
\newcommand{\vuphi}{\vu{\boldsymbol{\phi}}}
|
||||
\newcommand{\vuvarphi}{\vu{\boldsymbol{\varphi}}}
|
||||
|
||||
%% Differential elements
|
||||
\newcommand{\ds}{\dd{s}}
|
||||
\newcommand{\dx}{\dd{x}}
|
||||
\newcommand{\dy}{\dd{y}}
|
||||
\newcommand{\dz}{\dd{z}}
|
||||
\newcommand{\dt}{\dd{t}}
|
||||
\newcommand{\dr}{\dd{r}}
|
||||
\newcommand{\drho}{\dd{\rho}}
|
||||
\newcommand{\dvarrho}{\dd{\varrho}}
|
||||
\newcommand{\dtheta}{\dd{\theta}}
|
||||
\newcommand{\dvartheta}{\dd{\vartheta}}
|
||||
\newcommand{\dphi}{\dd{\phi}}
|
||||
\newcommand{\dvarphi}{\dd{\varphi}}
|
||||
\newcommand{\deron}{\partial}
|
||||
\newcommand{\ddr}{\dd[3]{\vect r}}
|
||||
\newcommand{\ddp}{\dd[3]{\vect p}}
|
||||
\newcommand{\ddk}{\dd[3]{\vect k}}
|
||||
|
||||
%% Physics complement
|
||||
\def\diffD{\mathrm{D}}
|
||||
\DeclareDocumentCommand\Differential{ o g d() }{
|
||||
\IfNoValueTF{#2}{
|
||||
\IfNoValueTF{#3}{
|
||||
\diffD\IfNoValueTF{#1}{}{^{#1}}
|
||||
}{
|
||||
\mathinner{\diffD\IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}}
|
||||
}{
|
||||
\mathinner{\diffD\IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}
|
||||
}
|
||||
}
|
||||
\DeclareDocumentCommand\DD{}{\Differential}
|
||||
\DeclareDocumentCommand\Variation{ o g d() }{
|
||||
\IfNoValueTF{#2}{
|
||||
\IfNoValueTF{#3}{
|
||||
\Delta \IfNoValueTF{#1}{}{^{#1}}
|
||||
}{
|
||||
\mathinner{\Delta \IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}}
|
||||
}{
|
||||
\mathinner{\Delta \IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}
|
||||
}
|
||||
}
|
||||
\DeclareDocumentCommand\Var{}{\Variation}
|
||||
|
||||
%% other commands
|
||||
\newcommand{\eg}{e.g.}
|
||||
\newcommand{\etal}{et al}
|
||||
\newcommand{\ie}{i.e.}
|
||||
\newcommand{\unit}[1]{\mathrm{~#1}}
|
||||
\newcommand{\axunit}[1]{\mathrm{~[#1]}}
|
||||
\newcommand{\angstrom}{\text{\r A}}
|
||||
\newcommand{\range}{\text{--}}
|
||||
\newcommand{\E}[1]{\times 10^{#1}}
|
||||
\newcommand{\simpropto}{\underset{\sim}{\propto}}
|
||||
\newcommand{\cfill}[1]{\hspace*{0cm}\hfill{#1}\hfill\hspace*{0cm}}
|
||||
\DeclareDocumentCommand\mean{s m}{
|
||||
\IfBooleanTF{#1}
|
||||
{ % \mean*{}
|
||||
\langle {#2} \rangle
|
||||
}{ % \mean{}
|
||||
\left\langle {#2} \right\rangle
|
||||
}
|
||||
}
|
||||
\newcommand{\ope}[1]{\hat{#1}}
|
||||
\newcommand{\opevect}[1]{\hat{\vb{#1}}}
|
||||
\DeclareDocumentCommand\atom{m g g g o}{
|
||||
\IfNoValueTF{#5}{
|
||||
\IfNoValueTF{#2}{
|
||||
\mathrm{#1}
|
||||
}{
|
||||
\IfNoValueTF{#3}{
|
||||
\prescript{#2}{}{\mathrm{#1}}
|
||||
}{
|
||||
\IfNoValueTF{#4}{
|
||||
\prescript{#2}{#3}{\mathrm{#1}}
|
||||
}{
|
||||
\prescript{#2}{#3}{\mathrm{#1}}_{#4}
|
||||
}}}}{
|
||||
\IfNoValueTF{#2}{
|
||||
\mathrm{#1}\text{\textsc{#5}}
|
||||
}{
|
||||
\IfNoValueTF{#3}{
|
||||
\prescript{#2}{}{\mathrm{#1}\text{\textsc{#5}}}
|
||||
}{
|
||||
\IfNoValueTF{#4}{
|
||||
\prescript{#2}{#3}{\mathrm{#1}\text{\textsc{#5}}}
|
||||
}{
|
||||
\prescript{#2}{#3}{\mathrm{#1}\text{\textsc{#5}}}_{#4}
|
||||
}}}}
|
||||
}
|
||||
\DeclareDocumentCommand\underbraceset{m g}{
|
||||
\IfNoValueTF{#2}{
|
||||
\underbrace{#1}
|
||||
}{
|
||||
\underset{#1}{\underbrace{#2}}
|
||||
}
|
||||
}
|
||||
\DeclareDocumentCommand\overbraceset{m g}{
|
||||
\IfNoValueTF{#2}{
|
||||
\overbrace{#1}
|
||||
}{
|
||||
\overset{#1}{\overbrace{#2}}
|
||||
}
|
||||
}
|
||||
\let\eqdef\equiv
|
||||
\let\ol\overline
|
||||
\let\ul\underline
|
||||
\let\name\text
|
||||
% Note: "cases" should now be used instead of "system"
|
||||
|
||||
|
||||
|
||||
18
yii_test.py
18
yii_test.py
@@ -1,18 +0,0 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def test_colors():
|
||||
x = range(10)
|
||||
y = [1]*10
|
||||
fig, ax = plt.subplots(1)
|
||||
for i in x:
|
||||
ax.scatter(x[i],y[i], s=100)
|
||||
|
||||
|
||||
test_colors()
|
||||
|
||||
plt.style.use("YII_1")
|
||||
|
||||
test_colors()
|
||||
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user