Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 18065

Use matplotlib.pyplot.rcparams with a custom font which is not installed

$
0
0

I'm trying to use a custom ttf font not installed in the system for text element in the matplotlib figure.

with plt.style.context('mplparams.mplstyle'):    plt.plot(np.sin(np.linspace(0, 3 * np.pi)), '-o')

I know I can change the text properties with FontManager but I'm looking for a solution which only involves an external config file.

At the moment I only know that i can change font.sans-serif to a font name, not font path.

Is this possible?


Viewing all articles
Browse latest Browse all 18065

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>