# Plotting a histogram with gmt

**URL:** <https://forum.generic-mapping-tools.org/t/plotting-a-histogram-with-gmt/1686>\
**Category:** Q&A\
**Created:** [May 15, 2021, 12:37pm UTC](https://forum.generic-mapping-tools.org/t/plotting-a-histogram-with-gmt/1686 "2021-05-15T12:37:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parker](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@parker](https://forum.generic-mapping-tools.org/u/parker)\
**Post date:** [May 15, 2021, 12:37pm UTC](https://forum.generic-mapping-tools.org/t/plotting-a-histogram-with-gmt/1686/1 "2021-05-15T12:37:04Z")

</div>

Hello everyone, I am using GMT 6.1.0, and I am plotting Histogram, with my code it only gave me the frame without the bar, please what can I do for it to show the bar. below is the code  
“gmt pshistogram time.dat -Bxa2f1+l"year of installation” -Bya20f5+l"cummulative number of sites" -BWSne+glightblue -R1994/2015/2/145 -JX5.4i/4.4i -Gred   
-L1p -Z1 -W250 \>\> t.ps" posscbly the data  
1994 2  
1995 5  
1996 6  
1997 8  
1998 9  
1999 11  
2000 41  
2001 43  
2002 44  
2003 45  
2004 49  
2005 51  
2006 61  
2007 76  
2008 99  
2009 104  
2010 113  
2011 117  
2012 137  
2013 141  
2014 142  
2015 145  
thanks

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [May 15, 2021, 1:07pm UTC](https://forum.generic-mapping-tools.org/t/plotting-a-histogram-with-gmt/1686/2 "2021-05-15T13:07:31Z")

</div>

In this case, due to your data set, you have to plot your data as bars with psxy.

---

<div class="post-metadata">

**Author:** ![parker](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@parker](https://forum.generic-mapping-tools.org/u/parker)\
**Post date:** [May 17, 2021, 5:58pm UTC](https://forum.generic-mapping-tools.org/t/plotting-a-histogram-with-gmt/1686/3 "2021-05-17T17:58:47Z")

</div>

Thank you, it actully work on bars. I think I may have to use bar instead of histogram
