Resize rgraph with window