Adapt graph dimensions to screen size.