aboutsummaryrefslogtreecommitdiffstats
path: root/utils/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/plot.py')
-rw-r--r--utils/plot.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/utils/plot.py b/utils/plot.py
index 5a3d1f7..6161cfb 100644
--- a/utils/plot.py
+++ b/utils/plot.py
@@ -978,7 +978,7 @@ def cmap_discretize(cmap, N):
return mpl.colors.LinearSegmentedColormap(cmap.name + "_%d"%N, cdict, 1024)
-def get_tax(ax, scale):
+def get_tax(ax, scale, ax_labels):
ax.set_aspect('equal')
# Boundary and Gridlines
@@ -991,9 +991,9 @@ def get_tax(ax, scale):
# Set Axis labels and Title
fontsize = 23
- tax.left_axis_label(r"$f_{\tau}$", fontsize=fontsize+8, offset=0.2, rotation=0)
- tax.right_axis_label(r"$f_{\mu}$", fontsize=fontsize+8, offset=0.2, rotation=0)
- tax.bottom_axis_label(r"$f_{e}$", fontsize=fontsize+8, position=(0.55, -0.20/2, 0.5), rotation=0)
+ tax.bottom_axis_label(ax_labels[0], fontsize=fontsize+8, position=(0.55, -0.20/2, 0.5), rotation=0)
+ tax.right_axis_label(ax_labels[1], fontsize=fontsize+8, offset=0.2, rotation=0)
+ tax.left_axis_label(ax_labels[2], fontsize=fontsize+8, offset=0.2, rotation=0)
# Remove default Matplotlib axis
tax.get_axes().axis('off')
@@ -1092,7 +1092,7 @@ def heatmap(data, scale, vmin=None, vmax=None, style='triangular'):
return vertices
-def flavour_contour(frs, ax, nbins, coverage, linewidth=2, color='black'):
+def flavour_contour(frs, ax, nbins, coverage, **kwargs):
"""Plot the flavour contour for a specified coverage."""
# Histogram in flavour space
H, b = np.histogramdd(
@@ -1155,8 +1155,8 @@ def flavour_contour(frs, ax, nbins, coverage, linewidth=2, color='black'):
# Plot
ax.plot(
- ev_polygon.T[0], ev_polygon.T[1], linewidth=linewidth, color=color,
- zorder=2, alpha=0.6, label=r'{0}\%'.format(int(coverage))
+ 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, color=color,
zorder=3)
@@ -1333,4 +1333,3 @@ def plot_source_ternary_1D(data, outfile, outformat, args):
for of in outformat:
print 'Saving plot as {0}'.format(outfile+'_DIM{0}.'.format(dim)+of)
fig.savefig(outfile+'_DIM{0}.'.format(dim)+of, bbox_inches='tight', dpi=150)
-