title: Python: Histogram with range, but distribution is calculated for whole set
body: <p>I'm using the matplotlib to draw a pdf histogram and need to use the <em>range</em> variable due to the appearance of the graph. Got a high in the start and in the end, the probability chance is so much higher for these peaks so the rest of the graph can't be seen so I need to use <em>range</em> to 'zoom' in. But when <em>range</em> is used probability density will only consider the data within the <em>range</em>.</p>
  
  <p>Is there a way to continue using <em>range</em> but the probability density is calculated not only with the data in the given <em>range</em> but all data?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: I'm plotting the pdf of packet sizes for a data set. The graph have peaks in the lower region ~100 bytes and at the upper region ~1450 bytes. To show the distribution in the middle of the data set I use range to zoom in different areas which gives better detail for the distribution.</p>
  
  <pre><code>ax.hist(x=list_of_pkt_sizes,bins=25,density=True,range=[500,1000])
  </code></pre>
  
  <p>This is an example of code snippet used to plot one of the zoomed in areas. As said above it now only shows the distribution for given range. I want the overall distribution.</p>