title: Where/When the interpreter generates the graphic output, seaborn vs matplotlib
body: <p>My question is about using seaborn and matplotlib together, common practice in many works.</p>
  <p>I don't understand what command actually generates the graphic output...</p>
  <h3 id="how-does-the-python-interpreter-know-when-to-plot-the-graph-eq1l">How does the Python interpreter know when to plot the graph?</h3>
  <p>I used to think <code>sns</code> was drawing the graph, since it would be the last command before a graphic output:</p>
  <pre><code>plt.title(&quot;Monthly Visitors to Avila Adobe&quot;)
  plt.xlabel(&quot;Date&quot;)
  
  sns.lineplot(data=museum_data['Avila Adobe'],label='Avila Adobe')
  </code></pre>
  <p>But I found others examples with inverted calls, <code>plt</code> in last, and the graphic output displayed only after the <code>plt</code> call:</p>
  <pre><code>sns.lineplot(data=museum_data['Avila Adobe'],label='Avila Adobe')
  
  plt.title(&quot;Monthly Visitors to Avila Adobe&quot;)
  plt.xlabel(&quot;Date&quot;)
  </code></pre>
  <p>The two codes above do exact the same graphics.</p>
  <p>I understand seaborn is build on top of matplotlib.</p>
  <p>But,</p>
  <h3 id="i-dont-understand-wherewhen-the-code-generates-the-graphic-output-after-the-sns-or-after-the-plt-vlu3">I don't understand where/when the code generates the graphic output: after the <code>sns</code> or after the <code>plt</code>?</h3>
  <p>What statement draw the graph?</p>
  <p>If my rationalization is wrong, pls clarify why.</p>