From: pieter c. <pi...@cl...> - 2005-02-03 14:56:18
|
Andre, >> 4. To cater for both continuous as well as discreet x-values (this again >> is a little unclear but I can imagine that not all statistical sampling >> would be agains continues values) > > Well, there are continous variables and those which aren't. > Non-continuous variables are for example "Germany", "US", "Japan", > "Russia" ... to be used on a bar graph. Continous variables are > numbers. Sure you can use integer numbers as discrete variables, but > that's almost always a misuse. Also times and dates are usually > continuous variables, although, in some usecases days of months or > such are used as discrete variables. > > A histogram should be build on continous variables. I don't think its > worth a discussion ... > Point taken. > Nice idea to look into the wikipedia. It exactly shows the whole > problem of a histogram: To fully describe a histogram, you need three > informations per data point: a position, a width and a hight. The only > problem is, that typically you do not have all the three informations > kept in a data file. Thats why I don't know how to implement such a > style. That's all. So we're back on my original question: What data > should we start with? In general, the following data is available: [[x1,y1],[x2,y2]......[xn,yn]] Graph width/height Would it be possible to express the step width as following: step_width = axis_length / num_data_points And do the x location of middle of each step: g_x[n] = gmin_xaxis + (n * step_width)/2 The y value of each step: g_y = gmin_yaxis + ((f(x) - fmin) / (fmax - fmin)) * gmax_yaxis [my IQ might let me down here!] What are your thoughts on this? Pieter |