title: How to customize matplotlib plots using gcf() or gca()?
body: <p>I am using a package called <code>shap</code> which has a integrated plot function. However i want to adjust some things like the labels, legend, coloring, size etc.</p>
  
  <p><a href="https://github.com/slundberg/shap/issues/247" rel="noreferrer">apparently due to the developer thats possible</a> via using plt.gcf().</p>
  
  <p>I call the plot like this, this will give a figure object but i am not sure how to use it:</p>
  
  <pre><code>fig = shap.summary_plot(shap_values_DT, data_train,color=plt.get_cmap("tab10"), show=False)
  ax = plt.subplot()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ZsBiT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZsBiT.png" alt="enter image description here"></a></p>
  
  <p><strong>UPDATE / SOLUTION</strong>
  Finally i got everything adjusted as i wanted it by doing the following:</p>
  
  <pre><code>shap.summary_plot(shap_values_DT, data_train, color=plt.get_cmap("tab10"), show=False)
  fig = plt.gcf()
  fig.set_figheight(12)
  fig.set_figwidth(14)
  ax = plt.gca()
  ax.set_xlabel(r'durchschnittliche SHAP Werte $\vert\sigma_{ij}\vert$', fontsize=16)
  ax.set_ylabel('Inputparameter', fontsize=16)
  ylabels = string_latexer([tick.get_text() for tick in ax.get_yticklabels()])
  ax.set_yticklabels(ylabels)
  leg = ax.legend()
  for l in leg.get_texts(): l.set_text(l.get_text().replace('Class', 'Klasse'))
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qg4XP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qg4XP.png" alt="enter image description here"></a></p>