Hello, everybody!
My problem might seem quite trivial, but I'd give my right hand to solve it!
Basically, I need to represent a range of short intergers, read from a file, in a shape of a histogramm. I am only a beginner and so far I only managed to get my "programm" to read the file and count the occurences of certain numbers. But when I attempt to use Canvas->MoveTo/LineTo to draw my simple graph by going through the range (20-80) of numbers (that would give it the coordinates on the x-axis), it is only the first number that my method returns the corresponding y-axis value for. How does it happen that the "for"-loop just does not seem to execute beyond its first step?
I also tried looking up some info on the TGraph component. In Help they say that it has to be a two-dimensional array, so even if I take the Number (x-axis)
for one dimension, and its occurences - for another dimension, how do I get my graph to recognize that Number should be "ThisPoint" and ItsOccurences - "ThisSet"? And what on earth does := mean? They used it to illustrate their examples in the Help menu, but then there is nothing on this operator(?) in the Index section!
Oh, dear, I am out of breath already! I hope somebody will take pity and spare a couple of minutes to help me out! Any answer would be much appreciated!
Thank you,
Victoria
My problem might seem quite trivial, but I'd give my right hand to solve it!
Basically, I need to represent a range of short intergers, read from a file, in a shape of a histogramm. I am only a beginner and so far I only managed to get my "programm" to read the file and count the occurences of certain numbers. But when I attempt to use Canvas->MoveTo/LineTo to draw my simple graph by going through the range (20-80) of numbers (that would give it the coordinates on the x-axis), it is only the first number that my method returns the corresponding y-axis value for. How does it happen that the "for"-loop just does not seem to execute beyond its first step?
I also tried looking up some info on the TGraph component. In Help they say that it has to be a two-dimensional array, so even if I take the Number (x-axis)
for one dimension, and its occurences - for another dimension, how do I get my graph to recognize that Number should be "ThisPoint" and ItsOccurences - "ThisSet"? And what on earth does := mean? They used it to illustrate their examples in the Help menu, but then there is nothing on this operator(?) in the Index section!
Oh, dear, I am out of breath already! I hope somebody will take pity and spare a couple of minutes to help me out! Any answer would be much appreciated!
Thank you,
Victoria