How do I get Helvetica font in math snippet in matplotlib? -


i want write $\eta=a^2$ in helvetica/arial matplotlib label. see 2 possibilities:

  1. u"η${}=a^2$" with

    matplotlib.rc("font", **{"sans-serif": ["arial"], "size": fontsize}) 
  2. u"$\\eta=a^2$" with

    matplotlib.rc("font", **{"sans-serif": ["arial"], "size": fontsize}) matplotlib.rc("text", usetex=true) matplotlib.rc("text.latex", preamble=["\\usepackage{helvet}\\usepackage{sfmath}"]) 

in first case, math has standard cm fonts. in second case, η in standard cm font. bummer. there way everything in helvetica/arial?

in first option, add following 'font' dictionary:

'style':'normal' 'family':'sans' 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -