PyPlot legend font

Hello everyone. I need to change the font legend in PyPlot. I have searched and can’t find a natural way to do it. = monospace.

PyPlot shares the matplotlib interface. Therefore, it is always possible to refer to the matplotlib documentation: (see the “prop” option description) (for possible font options)

The MWE will be the following:

using PyPlot

x = range(-4.0, 4.0, length=100)
y = @. exp(-x^2)

plot(x, y, label="Gaussian")

font = matplotlib.font_manager.FontProperties(
    family = "monospace",
    weight = "bold",
    style = "italic",
    size = 16,



1 Like

Very good, thank you.