# TTree-\>Draw(): 2D image with color map for third coordinate

**URL:** <https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687>\
**Category:** Newbie\
**Created:** [November 5, 2019, 1:57pm UTC](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687 "2019-11-05T13:57:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clapd](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@clapd](https://root-forum.cern.ch/u/clapd)\
**Post date:** [November 5, 2019, 1:57pm UTC](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687/1 "2019-11-05T13:57:32Z")

</div>

Hello,

I have a tree object eventTree, which contains four different branches: xCoord, yCoord, zCoord, time.  
Is there a way to plot 3 of these branches in a 2D image where the third coordinate values are given by a color map?  
To better explain myself, in a case like:

```auto
eventTree -> Draw(zCoord, yCoord, xCoord, time);

```

what we get is a 3D plot where time is expressed by a color map.

Is there a way to do the same in 2D?  
Something like:

```auto
eventTree -> Draw (yCoord, xCoord, time);

```

with time still assigned to a color map instead to an axis.

Thank you.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 5, 2019, 2:00pm UTC](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687/2 "2019-11-05T14:00:40Z")

</div>

```auto
eventTree->Draw("yCoord:xCoord:time", "", "col");

```

---

<div class="post-metadata">

**Author:** ![clapd](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@clapd](https://root-forum.cern.ch/u/clapd)\
**Post date:** [November 5, 2019, 2:08pm UTC](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687/3 "2019-11-05T14:08:21Z")

</div>

Thank you very much.
