latex plots: Change newcommand to providecommand to prevent error when it is already defined See merge request !924