# TGraph3D

**URL:** <https://root-forum.cern.ch/t/tgraph3d/1750>\
**Category:** ROOT\
**Created:** [April 5, 2005, 11:42am UTC](https://root-forum.cern.ch/t/tgraph3d/1750 "2005-04-05T11:42:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michele](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://root-forum.cern.ch/u/michele)\
**Post date:** [April 5, 2005, 11:42am UTC](https://root-forum.cern.ch/t/tgraph3d/1750/1 "2005-04-05T11:42:06Z")

</div>

Hello,

I have seen few announcements of the class TGraph3D (for instance [root.cern.ch/cgi-bin/print\_hit\_b … #first\_hit](http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk03/3520.html?splot#first_hit) ) . Has it been implemented already, but under a different name?

Regards  
Michele

---

<div class="post-metadata">

**Author:** ![brun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brun](https://root-forum.cern.ch/u/brun)\
**Post date:** [April 5, 2005, 12:09pm UTC](https://root-forum.cern.ch/t/tgraph3d/1750/2 "2005-04-05T12:09:39Z")

</div>

This is now implemented in class TGraph2D.  
see: [root.cern.ch/root/htmldoc/TGraph2D.html](http://root.cern.ch/root/htmldoc/TGraph2D.html)

Rene

---

<div class="post-metadata">

**Author:** ![rasehgal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rasehgal/32/28881_2.png) [@rasehgal](https://root-forum.cern.ch/u/rasehgal)\
**Post date:** [November 21, 2018, 4:17am UTC](https://root-forum.cern.ch/t/tgraph3d/1750/3 "2018-11-21T04:17:44Z")

</div>

Hello,  
I wanted to plot 3D point, and if found TGraph2D very useful for that.  
The problem that i am facing is that the color of the point is decided by the z value of the point.  
In my application the color of the point is defined by another value, so i am having set of points  
like  
**xval, yval, zval, col**

So is there any function to change the color of point and set its color depending on “col” value supplied

Thanks

---

<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:** [November 26, 2018, 10:21am UTC](https://root-forum.cern.ch/t/tgraph3d/1750/4 "2018-11-26T10:21:20Z")

</div>

You need to put your data into a TNtuple and do:

```auto
ntuple->Draw("xval:yval:zval:col","","COL")

```
