Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CLIMATE-949 - Enlarge font size on Taylor diagrams
- plotter.draw_taylor_diagram has a new parameter, legend_size, to control the font size of the legend
  • Loading branch information
huikyole committed May 15, 2018
1 parent 5d9dfcf commit 5d980b4dfddd04380da324ab7f32ebf9b873cecb
Showing 1 changed file with 5 additions and 2 deletions.
@@ -167,7 +167,7 @@ def _fig_size(gridshape, aspect=None):

def draw_taylor_diagram(results, names, refname, fname, fmt='png',
gridshape=(1, 1), ptitle='', subtitles=None,
pos='upper right', frameon=True, radmax=1.5):
pos='upper right', frameon=True, radmax=1.5, legend_size=13):
''' Draw a Taylor diagram.
:param results: An Nx2 array containing normalized standard deviations,
@@ -209,6 +209,9 @@ def draw_taylor_diagram(results, names, refname, fname, fmt='png',
:param radmax: (Optional) float to adjust the extent of the axes in terms of
standard deviation.
:type radmax: :class:`float`
:param legend_size: (Optional) float to control the font size of the legend
:type legend_size: :class:`float`
'''
# Handle the single plot case.
if results.ndim == 2:
@@ -239,7 +242,7 @@ def draw_taylor_diagram(results, names, refname, fname, fmt='png',
# Add legend
legend = fig.legend(dia.samplePoints,
[p.get_label() for p in dia.samplePoints],
handlelength=0., prop={'size': 10}, numpoints=1,
handlelength=0., prop={'size': legend_size}, numpoints=1,
loc=pos)
legend.draw_frame(frameon)
plt.subplots_adjust(wspace=0)

0 comments on commit 5d980b4

Please sign in to comment.