update matrix canvas