-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
axes_scale argument does not work? #222
Comments
Please put together a minimal, reproducible example that demonstrates the problem. Thanks! |
Same for me. Here an example:
Same thing if I just do |
@dfm -- i think this issue might be resolved by raising a value error if a user asks for log scales for a parameter with negative values. An example where axes_scale worksThe following snippet produces a corner with log-scaled axes: import numpy as np
import corner
import arviz as az
# Generate data
n_samples = 10000
samples = az.from_dict({
"log_a": np.random.lognormal(0, 1, n_samples),
"linear_b": np.random.normal(0, 1, n_samples),
"log_c": np.random.lognormal(0, 1, n_samples),
})
corner.corner(
samples,
axes_scale=['log', 'linear', 'log'],
show_titles=True
).savefig("corner_plot.png") Why @alessandropeca 's example does not yield log-scalesThe samples are negative in @alessandropeca's example, leading to nans bins. Using
This is how the bins are created: Line 222 in 2f2152b
bins_1d = np.logspace(
np.log10(min(range[i])), np.log10(max(range[i])), n_bins_1d + 1
) The lower bin will be a nan. |
Hello,
I am using a corner plot with 5 parameters. I would like the third parameter to be plotted using a log scale. I passed in this parameter but it does not seem to make any difference.
axes_scale=['linear', 'linear', 'log', 'linear', 'linear']
Am I specifying it correctly or is this a bug?
Thanks.
The text was updated successfully, but these errors were encountered: