better graph showing and hiding