set graph height based on width