0

I have the following minimal working example of code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import pylab as pl
import matplotlib.pyplot as plt

v=[2,2.5,3]
frec=[5,5.5,6]
pl.plot(frec, v, 'ro', markersize=6)
pl.xlabel(u'Wave frequency 'r'$\nu$'u' (Hz)', fontsize=17)
pl.ylabel(u'Phase velocity'r'$v$'u' (cm/s)', fontsize=17)
pl.xlim()
pl.xlim(4.8,6.2)
pl.ylim(1.8,3.2)
pl.show()

But when the plot is generated, the LaTeX code included on the labels is too small and does not fit well at all with the rest of the text. Is there any way to make it look better?

The result looks like this, where the greek letters are too small:

Plot

Community
  • 1
  • 1
Wild Feather
  • 219
  • 2
  • 5
  • 13
  • Can you maybe show a picture of what you mean. When running the code it looks like [this image](https://i.stack.imgur.com/I2P6V.png), where I cannot see any issue with size. – ImportanceOfBeingErnest Dec 08 '17 at 14:33
  • @ImportanceOfBeingErnest Of course, I'll edit it in a minute. – Wild Feather Dec 08 '17 at 14:38
  • You're using an old version of matplotlib. In that case, [this question](https://stackoverflow.com/questions/11367736/matplotlib-consistent-font-using-latex)'s accepted answer would be what you're looking for. Alternatively, you may update matplotlib. – ImportanceOfBeingErnest Dec 08 '17 at 14:47

0 Answers0