The first (and most important) task is to calculate the scaling factor for the graph. This is simply how many pixels in height each value will be worth when it is plotted.
第一项任务(也是最重要的任务)是计算图形的比例因子,就是说在绘图时每单位的值在高度上要占用多少像素。
The first (and most important) task is to calculate the scaling factor for the graph. This is simply how many pixels in height each value will be worth when it is plotted.
第一项任务(也是最重要的任务)是计算图形的 比例因子,就是说在绘图时每单位的值在高度上要占用多少像素。
As you can see, because the heights of the bars are calculated with respect to the highest value, the bars do not exceed 1000 pixels in height and do not end up being plotted too high.
可以看出,因为条的高度是相对于最大值计算得到的,条的高度不会超过1000像素,因此图不会画得太高。
应用推荐