Hi,
I have a 2D data set which is saved as .txt file. The dimension is 17x24. When I use the following command lines to load the data and assign the data to the pointer hist like this
std::ifstream input_file("mytxt.txt"); // there are 17 x 24 values in the .txt file, the delimiter is " ".
// one value in the file could be 100.5, or 200, or 12.
TH2D *hist = new TH2D("hist", "2D Histogram from Text File", 17, 0, 17, 24, 0, 24);
the generated histogram is not correct. Since there would be 17x24 grids, for each grid, the height value would be assigned the specific value extracted from the .txt file.
How can I generate such a LEGO
plot. Since I am a newbie in ROOT, could you please give me more details.
Thank you very much.
Wei
_ROOT Version:_6.32
Platform: ubuntu
Compiler: g++