# Problems with TGraph2D and pcol (and zcol)

**URL:** <https://root-forum.cern.ch/t/problems-with-tgraph2d-and-pcol-and-zcol/12595>\
**Category:** ROOT\
**Created:** [June 14, 2011, 9:05pm UTC](https://root-forum.cern.ch/t/problems-with-tgraph2d-and-pcol-and-zcol/12595 "2011-06-14T21:05:25Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![IzaakWN](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/izaakwn/32/16460_2.png) [@IzaakWN](https://root-forum.cern.ch/u/IzaakWN)\
**Post date:** [June 15, 2018, 11:32am UTC](https://root-forum.cern.ch/t/problems-with-tgraph2d-and-pcol-and-zcol/12595/12 "2018-06-15T11:32:28Z")

</div>

Hi @couet, thanks for the reply. The problem I had was exactly the one from here:

> [@TGraph2D: logarithmic z-axis](https://root-forum.cern.ch/t/tgraph2d-logarithmic-z-axis/16525/19):
>
> Now fixed in master: { TCanvas \*c = new TCanvas("c","Graph2D example",0,0,600,400); Double\_t x, y, z, P = 6.; Int\_t np = 200; TGraph2D \*dt = new TGraph2D(); TRandom \*r = new TRandom(); for (Int\_t N=0; N\<np; N++) { x = 2\*P\*(r-\>Rndm(N))-P; y = 2\*P\*(r-\>Rndm(N))-P; z = (sin(x)/x)\*(sin(y)/y)+0.2; dt-\>SetPoint(N,x,y,z); } gStyle-\>SetPalette(1); gPad-\>SetLogz(); dt-\>SetMarkerStyle(20); dt-\>Draw("pcolz"); c-\>SetPhi(0.00001); c-\>SetTheta(0.0…

I managed to switch to root 6.12/07, and I managed to get it working as expected.

---

_[View the full topic](https://root-forum.cern.ch/t/problems-with-tgraph2d-and-pcol-and-zcol/12595)._
