diff --git a/examples/02_pcac_example.ipynb b/examples/02_pcac_example.ipynb index d168553f..62b4ee2f 100644 --- a/examples/02_pcac_example.ipynb +++ b/examples/02_pcac_example.ipynb @@ -583,7 +583,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.6.9" } }, "nbformat": 4, diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index ddb4792c..739355c2 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -217,7 +217,7 @@ class Corr: return np.log(Corr(newcontent, padding_back=1)) - else: #This is usually not very stable. One could default back to periodic=False. + else: #This is usually not very stable. newcontent = [] for t in range(1, self.T - 1): if (self.content[t] is None) or (self.content[t + 1] is None)or (self.content[t - 1] is None): @@ -265,6 +265,14 @@ class Corr: #If one would not want to import pyplot, this could easily be replaced by a call to pe.plot_corrs #This might be a bit more flexible later def show(self, x_range=None, comp=None, logscale=False): + """Plots the correlator, uses tag as label if available. + + Parameters + ---------- + x_range -- list of two values, determining the range of the x-axis e.g. [4, 8] + comp -- Correlator or list of correlators which are plotted for comparison. + logscale -- Sets y-axis to logsclae + """ if self.N!=1: raise Exception("Correlator must be projected before plotting") if x_range is None: @@ -287,7 +295,7 @@ class Corr: if isinstance(comp, Corr) or isinstance(comp, list): for corr in comp if isinstance(comp, list) else [comp]: x,y,y_err=corr.plottable() - plt.errorbar(x, y, y_err, label=corr.tag) + plt.errorbar(x, y, y_err, label=corr.tag, mfc=plt.rcParams['axes.facecolor']) else: raise Exception('comp must be a correlator or a list of correlators.') diff --git a/setup.py b/setup.py index 0d0132b9..17e9e32e 100644 --- a/setup.py +++ b/setup.py @@ -9,5 +9,5 @@ setup(name='pyerrors', author_email='fabian.joswig@wwu.de', packages=find_packages(), python_requires='>=3.5.0', - install_requires=['numpy>=1.16', 'autograd>=1.2', 'numdifftools', 'matplotlib', 'scipy', 'iminuit'] + install_requires=['numpy>=1.16', 'autograd>=1.2', 'numdifftools', 'matplotlib', 'scipy'] )