Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit e440636f authored by ulrich_y's avatar ulrich_y
Browse files

21: Added option to watermakr in #17

parent 2f28fac6
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,6 @@ from loader import importreg, pattern, setup, sigma, \
mergeset, mergeseeds, mergefks, \
addsets, scaleset
from plot import errorband, kplot
from plot import errorband, kplot, watermark
from constants import pi, alpha, GF, conv, Mmu, Mel, Mtau
......@@ -14,6 +14,20 @@ rc('text.latex', preamble="\n".join([
]))
def watermark(fig, txt='PRELIMINARY', fontsize=60, rotation=20):
axs = fig.axes
corners = matplotlib.transforms.Bbox.union(
[i.get_position() for i in axs]
).corners()
center = np.average(corners, axis=0)
fig.text(
center[0], center[1],
txt,
fontsize=fontsize, rotation=rotation,
ha='center', va='center', alpha=0.1
)
def errorband(p, ax=None, col='default', underflow=False, overflow=False):
if ax is None:
ax = plt.gca()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment