title: How to set a default font weight for x & y labels with matplotlib
body: <p>Using matplotlib 3.0.1, I had to make a figure where all text had to be in Open Sans Light. As the figure is quite complex, with several panels etc, I wanted to set that up using matplotlib.pyplot.rc(..) to define the default font and font weight for all elements of the figure.</p>
  
  <p>The code below provides a minimal example. Because not everybody might have Open Sans installed, here I use the default font and the 'bold' weight, instead of 'light', to make it more general. So I set the default font weight, and size, then I plot a basic axis with x and y labels and some extra text.</p>
  
  <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
  
  plt.style.use('default')
  
  plt.rc('font', weight='bold', size=15)
  
  fig, ax = plt.subplots(num=1, clear=True)
  
  ax.set(xlabel='x-label', ylabel='y-label')
  ax.text(0.2,0.4,'Text')
  </code></pre>
  
  <p>I expect all bits of text to be in 'bold' font weight. The tick labels and the extra bit of text are, but the x-label and y-label are not. They are in the normal weight. <a href="https://i.stack.imgur.com/rOd86.png" rel="nofollow noreferrer">Screen capture here.</a></p>
  
  <p>The x and y labels seem to get the default font name and size, but not the default weight.</p>
  
  <p>As a workaround, I tried to set a default font weight in the 'axes' options, but that does not seem to be possible. "axes.labelsize" affects the font size of the x,y labels, but the font weight cannot be separately specified. </p>
  
  <p>So it seems the font size is inherited by the x and y labels, if not otherwise specified through axes.labelsize, but the font weight is not inherited by the labels, nor can it be specified as a default for the axes. Note that the font name behaves yet differently. It is inherited by the x, y labels but cannot have a different default in the 'axes' option.</p>
  
  <p>Is there a logic, or is that a bug? </p>
  
  <p>Is there a solution to this? Or do I have to directly set the font weight onto the x-label and y-label objects?</p>