Add set_ticks() function to control major/minor ticks in matplotlib in a single line of code.