title: Python - Use bins from one sns.histplot() for another / Extract bin information from an sns.histpllot()
body: <p>I am trying to plot 2 histograms side by side, the first one for the full dataset, and second one for a subset of the dataset. For comparability, I want both to have the same class intervals and the bin widths must be calculated as per the Freedman-Diaconis rule, (probably the default mode used by sns.histplot as per a stackoverflow answer).</p>
  <p>I want the first histogram's bins to be the defaults decided by the sns.histplot() function.<br />
  Then I want to extract the list of bin intervals or break points used by the first plot, and use that as an argument while generating the second histogram.</p>
  <pre><code>import pandas as pd
  import numpy as np
  import seaborn as sns
  import matplotlib.pyplot as plt
  
  from sklearn.datasets import load_boston
  boston = load_boston()
  df = pd.DataFrame(boston.data, columns=boston.feature_names)
  
  # Histograms
  f, axs = plt.subplots(1, 2, figsize=(15, 4.5))
  a = sns.histplot(df['NOX'], ax=axs[0], color='steelblue')
  b = sns.histplot(df.NOX[df.CRIM &gt; 10.73], ax=axs[1], color='darkgreen')
  plt.show()
  </code></pre>
  <p><strong>Questions:</strong><br />
  <strong>1) How to extract the list of bins used by a sns.histplot()</strong><br />
  <strong>2) How to plot 2 histograms with same bins, using the Freedman-Diaconis rule?</strong></p>