From 237135d03a5b587451a093c7aac0633f202f0863 Mon Sep 17 00:00:00 2001 From: Guillermo Aguilar Date: Sun, 15 Jun 2025 15:26:17 +0200 Subject: [PATCH 1/4] fixes bug in x-range of posterior samples plot --- psignifit/psigniplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psignifit/psigniplot.py b/psignifit/psigniplot.py index 7b445b3..d47c330 100644 --- a/psignifit/psigniplot.py +++ b/psignifit/psigniplot.py @@ -669,7 +669,7 @@ def plot_posterior_samples( # Plot the samples from the posterior sigmoid = result.configuration.make_sigmoid() - x = np.linspace(0.001, 0.01, num=1000) + x = np.linspace(result.data[:, 0].min(), result.data[:, 0].max(), num=1000) for idx in range(n_samples): y = sigmoid( x, From 3a046a41a4325f43a4d0de0ba3b58b88efa4a8b2 Mon Sep 17 00:00:00 2001 From: Guillermo Aguilar Date: Sun, 15 Jun 2025 16:20:18 +0200 Subject: [PATCH 2/4] set plotting of posterior samples to a back layer, so there is no overlap with datapoints --- psignifit/psigniplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psignifit/psigniplot.py b/psignifit/psigniplot.py index d47c330..8e5185f 100644 --- a/psignifit/psigniplot.py +++ b/psignifit/psigniplot.py @@ -678,7 +678,7 @@ def plot_posterior_samples( gamma=params_samples['gamma'][idx], lambd=params_samples['lambda'][idx], ) - ax.plot(x, y, alpha=samples_alpha, color=samples_color) + ax.plot(x, y, alpha=samples_alpha, color=samples_color, zorder=-1) # Plot the point estimate of the psychometric function plot_psychometric_function( From 5a75913a8a4f7b191b20c58213892bc96f3b59ba Mon Sep 17 00:00:00 2001 From: Guillermo Aguilar Date: Mon, 16 Jun 2025 11:52:37 +0200 Subject: [PATCH 3/4] changes zorder of posterior samples in plot --- psignifit/psigniplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psignifit/psigniplot.py b/psignifit/psigniplot.py index 8e5185f..0991743 100644 --- a/psignifit/psigniplot.py +++ b/psignifit/psigniplot.py @@ -678,7 +678,7 @@ def plot_posterior_samples( gamma=params_samples['gamma'][idx], lambd=params_samples['lambda'][idx], ) - ax.plot(x, y, alpha=samples_alpha, color=samples_color, zorder=-1) + ax.plot(x, y, alpha=samples_alpha, color=samples_color, zorder=.5) # Plot the point estimate of the psychometric function plot_psychometric_function( From 6ba51c645bda89ea7eac8f917e07fb0a43f5ccf8 Mon Sep 17 00:00:00 2001 From: Guillermo Aguilar Date: Mon, 16 Jun 2025 12:05:14 +0200 Subject: [PATCH 4/4] added line in readme just to trigger tests --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5af8b3b..fd7aa7f 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,4 @@ See the [CONTRIBUTORS](https://github.com/wichmann-lab/python-psignifit/blob/mas ## License and COPYRIGHT See the [COPYRIGHT](https://github.com/wichmann-lab/python-psignifit/blob/master/COPYRIGHT) file +