gmaravel
gmaravel

Reputation: 357

matplotlib: legend issue while embedding fonts in eps figure

I create a plot and I select the font type to be TrueType (by using rcParams['ps.fonttype'] = 42). I am using this image later on in a tex file and when I am creating the pdf file I check for the font types and I see name type emb sub uni object ID [none] Type 3 yes no no 160 0

But if I comment the legend while making the plot then I do not get a Type 3 font.

Why is that? It seems that the fonttype does not apply to the legend (or am I missing something?).

Upvotes: 2

Views: 998

Answers (1)

gmaravel
gmaravel

Reputation: 357

After stepping on a similar post [1] I found that the use of

rcParams['text.usetex'] = True

was enough to give me a final result with a Type 1 font!

[Note: dvipng has to be installed before adding these lines - or else matplotlib will complain and it will show you nothing]

Upvotes: 2

Related Questions