[grids] add flatten_grid method for visualizers
[gui.glumpy] use flatten_grid