25 lines
1016 B
Markdown
Raw Normal View History

2025-02-02 22:59:33 +01:00
# Scripts
Put all scripts that generate plots or tex files here.
2025-02-15 16:01:05 +01:00
You can run all files at once using `make scripts`
2025-02-02 22:59:33 +01:00
## Plots
2025-03-09 20:25:09 +01:00
### `matplotlib`
2025-02-02 22:59:33 +01:00
For plots with `matplotlib`:
2025-02-15 16:01:05 +01:00
1. import `formulary.py`
2025-02-02 22:59:33 +01:00
2. use one of the preset figsizes
3. save the image using the `export` function in the `if __name__ == '__main__'` part
2025-03-09 20:25:09 +01:00
### `ase` - Atomic Simulation Environment
For plots with `ase`:
1. import `formulary.py` and `util.aseutil`
2. Use `util.aseutil.set_atom_color` to change the color of all used atoms to one in the colorscheme
3. export the render using the `export_atoms` function in the `if __name__ == '__main__'` part.
Pass one of the preset figsizes as size.
2025-02-15 16:01:05 +01:00
## Colorscheme
To ensure a uniform look of the tex source and the python plots,
the tex and matplotlib colorschemes are both handled in `formulary.py`.
Set the `COLORSCHEME` variable to the desired colors.
Importing `formulary.py` will automatically apply the colors to matplotlib,
and running it will generate `util/colorscheme.tex` for LaTeX.