title: Prometheus latency graph in histogram and calculate percentile
body: <p>I need to plot latency graph on prometheus by the histogram time-series, but I've been unsuccessful to display a histogram in grafana.</p>
  <p>What I expect is to be able to show:
  Y-axis is latency, x-axis is timeseries.</p>
  <p>Each line representing the p50,p75,p90,p100 - aggregated for a given time window.
  A sample metric would be the request time of an nginx.</p>
  <p>suppose if i have a histogram like this,</p>
  <pre><code>nginx_request_time_bucket(le=1) 1,
  nginx_request_time_bucket(le=10) 2,
  nginx_request_time_bucket(le=60) 2,
  nginx_request_time_bucket(le=+inf) 5
  </code></pre>
  <p>An example graph of what I am looking for is in this link,
  [][]
  [click]: <a href="https://www.instana.com/blog/how-to-measure-latency-properly-in-7-minutes/" rel="noreferrer">https://www.instana.com/blog/how-to-measure-latency-properly-in-7-minutes/</a></p>
  <p>I tried to picture histogram with heatmap using this query but this doesn't give me what im looking for. Im looking something similar to the graph</p>
  <pre><code>histogram_quantile(0.75, sum(rate(nginx_request_time_bucket[5m])) by (le))
  </code></pre>
  <p>Any help here is highly appreciated!</p>