1

I basically want to do the same thing as here, but with latex on. Is there a way of forcing Inkspace recognize Tex fonts/text when as text?

matplotlib - plot outputs text as paths and cannot be converted to LaTeX by Inkscape

However, having latex = True

from scipy.stats import lognorm
from matplotlib import rc
import matplotlib.pyplot as plt
import numpy as np
import os
import matplotlib
matplotlib.rcParams['svg.fonttype'] = 'none'
rc('text', usetex=True)
rc('font', family='Times New Roman')
rc('font', size='20.0')

mu    = 1.7
sigma = 1.1
data = np.arange(0,100)

n, bins, patches = plt.hist(data, bins=10000, facecolor='k', edgecolor='k', 
                            normed=True, alpha=0.3, histtype='stepfilled',
                            label='\\noindent Empirical data')
y = lognorm.pdf( bins, sigma, scale=np.exp(mu))
plt.xlim( (0,50) )
plt.plot(bins, y, '-', color='k', linewidth=2, label='\\noindent Lognormal curve')
plt.ylim( (0, .15) )
plt.xlabel('my x label')
plt.ylabel('my y label')

plt.grid()
plt.legend()
plt.savefig(os.path.expanduser('~/myfile.svg'))

I want to import this as text into Inkspace. Is it possible?

Jonas Kublitski
  • 119
  • 1
  • 11

0 Answers0