Files
python-tudplot/README.md
2025-11-05 10:26:01 +00:00

40 lines
1.1 KiB
Markdown

# TUDPlot
A package for matplotlib plotting in the corporate style of the TU Darmstadt.
## Installation
Make sure dependencies are installed:
* Python 3.5
* matplotlib
* numpy
Download the source as [zip file](https://gitea.pkm.physik.tu-darmstadt.de/IPKM/python-tudplot/archive/main.zip) or clone it with git:
git clone https://gitea.pkm.physik.tu-darmstadt.de/IPKM/python-tudplot.git
Then in the unpacked source directory run:
python3 setup.py install --user
## Usage
Use the function `activate` to activate TU styled plotting:
import tudplot
tudplot.activate()
A call with no arguments will activate a nominal color range of 6 distinct TU colors.
One can specify the keyword `full` to enable a range of continuous colors from the full TU color spectrum.
tudplot.activate(full=10)
TUDPlot also comes with a basic exporter `saveagr`, to save the current matplotlib figure in xmgrace agr format.
from matplotlib import pyplot as plt
fig = plt.figure()
fig.plot([1,2,3], label='Test')
# Do more plotting here...
# When the figure is complete:
tudplot.saveagr('test.agr')