# TH3D histogram: Lego plot issue

**URL:** <https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104>\
**Category:** Newbie\
**Created:** [August 23, 2020, 10:02am UTC](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104 "2020-08-23T10:02:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_hayden](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/ecccb3/32.png) [@Liam\_hayden](https://root-forum.cern.ch/u/Liam_hayden)\
**Post date:** [August 23, 2020, 10:02am UTC](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104/1 "2020-08-23T10:02:02Z")

</div>

I am trying to plot lego plots in 3D. But my lego plot looks like this

 ![pt_spectrum](https://root-forum.cern.ch/uploads/default/original/3X/d/c/dcdd281cd57ac84882d9780425965617fa5a6176.png)

Can anyone tell me what to do to get the normal ones. like i want a continuous one and the why i am getting such a plot. I used the option “Lego2”.

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [August 23, 2020, 11:10am UTC](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104/2 "2020-08-23T11:10:43Z")

</div>

Although you see colours, there’s no Lego2 option for TH3x histograms (see the options in the [documentation](https://root.cern/doc/master/classTHistPainter.html#HP25)).  
As for your question, I suppose you mean you want to see solid vertical columns instead of “floating” boxes. But on your TH3D histogram you have 4 “things”: rapidity, azimuth, Pt and the number of entries in each (3-D) bin; with these you cannot directly plot columns; you will have to “lose” (project/remove/whatever) one of the 4, using for example a TH2D that you can then plot with a Lego option.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [August 31, 2020, 3:24pm UTC](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104/5 "2020-08-31T15:24:27Z")

</div>

You might want to project your TH3 into (several) TH2.
