title: Globally changing matplotlib default styles
body: <p>I have a question: how can I use a default style on matplotlib (because I like it) but change only a single parameter? Here's an example:
  using the default matplotlib style or the "calssic" one I can change the font size globally by updating rcParams:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.style.use('classic')
  plt.rcParams.update({'font.size': 18.0})
  
  x = [0, 1, 2, 3]
  y = [0, 1, 4, 9]
  
  fig, ax0 = plt.subplots()
  ax0.plot(x, y)
  ax0.set_xlabel('data x')
  ax0.set_ylabel('data y')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/34Mkk.png" rel="nofollow noreferrer">output</a></p>
  
  <p>if instead I choose a different default style at the beginning:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.style.use('seaborn')
  plt.rcParams.update({'font.size': 18.0})
  
  x = [0, 1, 2, 3]
  y = [0, 1, 4, 9]
  
  fig, ax0 = plt.subplots()
  ax0.plot(x, y)
  ax0.set_xlabel('data x')
  ax0.set_ylabel('data y')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vjzYr.png" rel="nofollow noreferrer">the font size remains of the default value</a>
  it doesn't work like that; </p>
  
  <pre><code>plt.rcParams.update({'font.size': 18.0})
  </code></pre>
  
  <p>It's like the <code>font.size</code> line doesn't exist.
  Now a simple solution to this would be to define a global variable with a specific font size and manually add it to every element of the plot but it doesn't sound that clever to me. Any other ideas how to modify the fontsize globally? Is it in fact possible or do I just have to deal with it and create a matplotlib style file on my own?</p>
  
  <p>EDIT:
  By a more careful thought, following DavidG comment, I tried with different styles: ggplot and fivethirtyeight even seaborn-dark, and my code works (as I would expect). The issue is then related to the seaborn style only (that I am being to unlucky to choose).. </p>