
from matplotlib.pyplot import (plot, savefig, xlabel, ylabel)


## Plotting with matplotlib ##

def plotting(energies, intensity):
	for x in energies:
		for y in intensity:
			plot(x, y)
	xlabel("eV")
	ylabel("I")
	title("I(E)-curve")
	show()

## Saving a plot to a file ##

def savePlot(self):
	filename = str(QFileDialog.getSaveFileName(self, "Save the plot to a file"))
	if filename:
		self.savefig(filename, format="pdf")


