Problem with logarithmic y axis in palette plot


I want to make the y-axis logarithmic in my palette plot. But making the y-axis logarithmic (c1->SetLogy()), the points in the plot looks completely different. I have attached the two plots for comparison. I tried with the latest root version. Also, I made the plot with TH2F and pcolz option reading from a 3 column data file.

Thanks a lot,

data.pdf (20.1 KB) data_logY.pdf (19.4 KB)

You are using the COLZ option. Each bin is drawn as a filled rectangle. The bin limits are the same in linear and log scale. So bins along the Y axis in log scale appear as rectangles. That’s normal, specially in the bottom of the decades.

Ok. Is there other option than colz to make same size boxes for each point or is there a way to remake same size boxes? I needed the points with logy to look like the same with no logscale on y axis.

I can see two ways:

  1. you draw yourself the markers at the bin center
  2. you use a TGraph2D drawn with option PCOL

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.