fix a bug in draw.js
The max scale for y axis should depend on both row1 and row2.