I want the font in my python plot to be consistent with the latex. I found another answer. But it doesn't work on my computer and the error is
KeyError: 'text.latex.unicode is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'
Can anyone provide me a method that can be used for current version of python?