Changing font family in Plots using pythonplot() (globally)

Specifically to “Latin Modern Roman”, to have it match the LaTeX document the plots will be used in. This seems like a simple issue, just set

const PLOTS_DEFAULTS = Dict(
    :theme=>:default,
    :fontfamily => "Latin Modern Roman")

in startup.jl.

Unfortunately this doesn’t work properly. For ticklabels to work, the ticklabels must be set manually. that’s not an option, I have a lot of plots to do. I haven’t figured out how to make it work for latex-formatted code.

I have something like this in my code to use STIX

matplotlib = pyimport("matplotlib")
rc = matplotlib."rcParams"
rc["mathtext.fontset"] = "stix"
rc["font.family"]    = "STIXGeneral"