Saving Images as .pdf files

Hi,

I'm havind difficulty plotting saving pylab images in pdf format. At the moment, they are saved as .png files by default using:

savefig(‘name’,dpi=300)

However, if I try:

savefig(‘name.pdf’)

The program crashes. Is there anyway of solving this problem?

Regards,

Jony