I have been trying to get matplotlib to correctly display the £/€ symbols as an axis label and have ended up finding something quite confusing that I was hoping someone here may be able to shed some light on.

If I type the following into my python console: `unicode('£','utf-8')`, I get this error: `UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 0: invalid start byte`.

However, if I execute a python script with this as my only line, I get the '£' symbol printed back to me (and this is ultimately how I ended up getting the '£' symbol into my plot).

```
print unicode('£','utf-8')

```

Any ideas? Thanks for any insight you may be able to give!

Ben

EDIT:

Two scripts and the output of each:

```
import matplotlib.pyplot as plt

plt.plot( [ 1, 2, 3 ] )
ax = plt.gca()
ax.set_ylabel( unicode( '£', 'utf-8' ) )
plt.show()

```

Output:

![Output1](https://i.imgur.com/hlfaNJD.png)

```
import matplotlib.pyplot as plt

plt.plot( [ 1, 2, 3 ] )
ax = plt.gca()
ax.set_ylabel( u'£' )
plt.show()

```

Output:

![Output2](https://i.imgur.com/GPteDNG.png)

EDIT 2:

Adding `#coding: utf8` to my second example code doesn't change things:

```
#coding: utf8

import matplotlib.pyplot as plt

plt.plot( [ 1, 2, 3 ] )
ax = plt.gca()
ax.set_ylabel( u'£' )
plt.show()

```

Output:

![Output3](https://i.imgur.com/gk2CjVs.png)