Hi friends.I am practicing tutorial and I faced one code for doing one plot with all data like this:
#load the binning analysis for the absolute value of the magnetization binning = pyalps.loadBinningAnalysis(pyalps.getResultFiles(prefix='param'),'|Magnetization|') binning = pyalps.flatten(binning)
#make one plot with all data for dataset in binning: dataset.props['label'] = 'L='+str(dataset.props['L'])
plt.figure() plt.xlabel('binning level') plt.ylabel('Error of |Magnetization|') pyalps.plot.plot(binning) plt.legend() plt.show()
Now I have 2 question:
1. I can not understand what is the meaning of : " dataset.props['label'] = 'L='+str(dataset.props['L'])",what is its meaning?
2. And also if I wanna plot energy versus temperature , which part of the above code must be changed ?
thanks alot for your help
2012/12/8 sh sh sh_po_159@yahoo.com
B on page 24 might be useful for you. Check also http://docs.python.org/2/tutorial/datastructures.html : 5.5. Dictionaries Good idea is also to look into build-in documention. Simply run python shell and type for example:
import pyalps help(pyalps.loadBinningAnalysis)
best regards, Rafal Skolasinski
comp-phys-alps-users@lists.phys.ethz.ch