title: In python, how can I change the font size of leaf nodes when generating phylogenetic trees using Bio.Phylo.draw()?
body: <p>I am using the Phylo package from Biopython to create phylogenetic trees.</p>
  
  <p>For big trees, I need to decrease the fontsize of the leaf nodes. It has been suggested to change matplotlib.pyplot.rcParams['font.size'] but this only allows me to change axes names and titles, as Phylo defines its own font sizes.
  I can not change Phylo source code as I am using it at the University.
  Defining figures or axes is not an option as Phylo.draw() creates its own.</p>
  
  <p>Does anyone have any suggestions on how to solve the problem, maybe stretching the y-axis?</p>
  
  <p>So far I was using the following code to produce the tree:</p>
  
  <pre><code>import matplotlib
  import matplotlib.pyplot as plt
  from Bio import Phylo
  from cStringIO import StringIO
  
  def plot_tree(treedata, output_file):
  
      handle = StringIO(treedata) # parse the newick string
      tree = Phylo.read(handle, "newick")
      matplotlib.rc('font', size=6)
      Phylo.draw(tree)
      plt.savefig(output_file)
  
      return
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Y14OQ.png" alt="Plot"></p>