# Histogram plot

**URL:** <https://community.wolfram.com/t/histogram-plot/13038>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [August 31, 2018, 6:11am UTC](https://community.wolfram.com/t/histogram-plot/13038 "2018-08-31T06:11:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkoksal](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mkoksal](https://community.wolfram.com/u/mkoksal)\
**Post date:** [August 31, 2018, 6:11am UTC](https://community.wolfram.com/t/histogram-plot/13038/1 "2018-08-31T06:11:29Z")

</div>

Hi,  
I have datas as follows,

```
data={(1,2),(2,4),(3,6),(4,8),(5,10),(61,2),(7,8),(8,6),(9,3),(10,2)}

```

I want to plot a histogram of this data.

Best Regards,

Kemal

---

<div class="post-metadata">

**Author:** ![mikayele](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mikayele/32/18393_2.png) [@mikayele](https://community.wolfram.com/u/mikayele)\
**Post date:** [August 31, 2018, 9:10am UTC](https://community.wolfram.com/t/histogram-plot/13038/2 "2018-08-31T09:10:34Z")

</div>

```auto
data = {{1, 2}, {2, 4}, {3, 6}, {4, 8}, {5, 10}, {61, 2}, {7, 8}, {8, 6}, {9, 3}, {10, 2}}; 
Histogram[data]

```

 ![ScreenShot2018-08-31at1.09.21PM.png](https://global.discourse-cdn.com/wolfram/original/2X/e/eefebb03cd3a635165fd83f5a45f948c832ceff7.png)

---

<div class="post-metadata">

**Author:** ![jbaldwin](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jbaldwin](https://community.wolfram.com/u/jbaldwin)\
**Post date:** [September 1, 2018, 3:12pm UTC](https://community.wolfram.com/t/histogram-plot/13038/3 "2018-09-01T15:12:56Z")

</div>

I’m assuming that the first element is either the midpoint for a histogram bar or the integer value that the variable of interest takes and the second element is a count. (Also, I’m pretty sure that `{61,2}` should have been `{6,12}`.)

```
data = {{1, 2}, {2, 4}, {3, 6}, {4, 8}, {5, 10}, {6, 12}, {7, 8}, {8, 6}, {9, 3}, {10, 2}};
BarChart[data[[All, 2]], ChartLabels -> data[[All, 1]]]

```

 ![barchart.png](https://global.discourse-cdn.com/wolfram/original/2X/0/06264b4ceaddc28611928d6b94a3f48ed6aea1c9.png)

If the values 1 through 10 are not just discrete values but rather midpoints of the histogram bars (meaning the the underlying distribution is continous), then removing the spacing between bars would be more appropriate.

```
BarChart[data[[All, 2]], ChartLabels -> data[[All, 1]], BarSpacing -> None]

```

 ![barchartnospacing.png](https://global.discourse-cdn.com/wolfram/original/2X/a/a54d4a594ebe1c38d6fcb502bdacdcc76100a6e0.png)
