Hello rooters

I am trying to create a TH2F and fill it, I want the pixel colors to be red so I use SetFillColor, but my pixels are still turning out black. Can you please have a look at the attached files and suggest the correction. Everything is fine except I want my pixels to be red instead of black.


mdis.C (1.21 KB)

What you see is not a filled histogram, but a histogram with many dot markers. Use SetFillColorSetMarkerColor and it should look like you want.

EDIT I type faster than I think.

I think you mean SetMarkerColor.

To OP: TH1 (and TH2) are derived from TAttMarker, which has SetMarkerColor function, so, I think, you can try this.

thank you very much. It worked just fine.

Note also:
To learn about the set-functions you need to use to change attributes, the simplest way is to modify the picture interactively and to save it in a .C file. In this .C file you will find the function calls needed to perform the changes you just did.