# How to apply a color gradient to TH3F 3D surface plots?

**URL:** <https://root-forum.cern.ch/t/how-to-apply-a-color-gradient-to-th3f-3d-surface-plots/63394>\
**Category:** Newbie\
**Created:** [April 14, 2025, 11:23pm UTC](https://root-forum.cern.ch/t/how-to-apply-a-color-gradient-to-th3f-3d-surface-plots/63394 "2025-04-14T23:23:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noisyboy](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/noisyboy/32/37089_2.png) [@Noisyboy](https://root-forum.cern.ch/u/Noisyboy)\
**Post date:** [April 14, 2025, 11:23pm UTC](https://root-forum.cern.ch/t/how-to-apply-a-color-gradient-to-th3f-3d-surface-plots/63394/1 "2025-04-14T23:23:51Z")

</div>

Dear ROOT team,

I’m working on visualizing 3D probability density functions using `TH3F` histograms. When I use `Draw("ISO")`, I get a solid surface, but I would like to apply a **color gradient** (heatmap style) to better reflect the variations in density or intensity across the surface.  
Is there a way to do this in ROOT?  
I’d really appreciate any guidance.

 ![Captura desde 2025-04-14 18-10-13](https://root-forum.cern.ch/uploads/default/original/3X/0/a/0ac9c427fc89811d7f481a9d190052a2e1f31f6b.png)  
 ![Captura desde 2025-04-14 18-10-37](https://root-forum.cern.ch/uploads/default/original/3X/f/c/fc12fb20a934ba4a49d3acf42892b845ec5f1d6e.png)

```auto
cMain->cd(3);
    hist->SetTitle("Density 3D ");
    hist->GetXaxis()->SetTitle("X");
    hist->GetYaxis()->SetTitle("Y");
    hist->GetZaxis()->SetTitle("Z");
    hist->GetXaxis()->SetTitleOffset(2.0);
    hist->GetYaxis()->SetTitleOffset(2.0);
    hist->GetZaxis()->SetTitleOffset(1.5);
    hist->SetFillColor(kBlue);
    hist->SetLineColor(kBlue); 
    hist->Draw("ISO SURF2"); 

```

Thank you everyone.

_ROOT Version:_ 6.28/04  
_Platform:_ Ubuntu  
_Compiler:_ GCC

---

<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:** [April 15, 2025, 11:25am UTC](https://root-forum.cern.ch/t/how-to-apply-a-color-gradient-to-th3f-3d-surface-plots/63394/2 "2025-04-15T11:25:39Z")

</div>

The supported options for TH3 are listed here:

> **[ROOT: THistPainter Class Reference](https://root.cern/doc/master/classTHistPainter.html#HP01d)**
