aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-04-24 14:01:38 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-04-24 14:01:38 +0100
commitad550dc259167f7d62593b024be7fa2a1c7cb75a (patch)
tree457a30f4d2d2a7db26b392931957b6cb9eb06f71 /utils
parenta3df620a87fb6f773bcf71709b37d04f62f8aa0a (diff)
downloadGolemFlavor-ad550dc259167f7d62593b024be7fa2a1c7cb75a.tar.gz
GolemFlavor-ad550dc259167f7d62593b024be7fa2a1c7cb75a.zip
Wed 24 Apr 14:01:38 BST 2019
Diffstat (limited to 'utils')
-rw-r--r--utils/plot.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/utils/plot.py b/utils/plot.py
index a635d9d..9fd2f52 100644
--- a/utils/plot.py
+++ b/utils/plot.py
@@ -203,7 +203,7 @@ def get_tax(ax, scale, ax_labels):
return tax
-def flavour_contour(frs, ax, nbins, coverage, **kwargs):
+def flavour_contour(frs, ax, nbins, coverage, fill=False, **kwargs):
"""Plot the flavour contour for a specified coverage."""
# Histogram in flavour space
H, b = np.histogramdd(
@@ -265,10 +265,16 @@ def flavour_contour(frs, ax, nbins, coverage, **kwargs):
ev_polygon = np.dstack((xi[~mask], yi[~mask]))[0]
# Plot
- ax.plot(
- ev_polygon.T[0], ev_polygon.T[1], label=r'{0}\%'.format(int(coverage)),
- **kwargs
- )
+ if fill:
+ ax.fill(
+ ev_polygon.T[0], ev_polygon.T[1], label=r'{0}\%'.format(int(coverage)),
+ **kwargs
+ )
+ else:
+ ax.plot(
+ ev_polygon.T[0], ev_polygon.T[1], label=r'{0}\%'.format(int(coverage)),
+ **kwargs
+ )
# ax.scatter(points.T[0], points.T[1], marker='o', s=2, alpha=1, zorder=3,
# **kwargs)