Comments (4)
The main problem is backward compatibility: any code that ran smoothly before v2.2.2 now breaks, even if the quantiles
value it provides is still valid from what can be read in the documentation.
From what I see this is an actual issue due to the former behaviour of show_titles
and quantiles
which did not actually reflect what was written in the documentation (from what I understand and see from older versions of the code, while quantiles
was supposed to impact what was shown in the title, the quantiles were actually hardwired to [0.16, 0.5, 0.84]). You can take a look at issue #193 which mentions the corresponding issue.
Anyway, I submitted as a suggestion pull request #244, hopefully it restores backward compatibility while maintaining the expected behaviour of title_quantiles
when provided (and I took care of clarifying in the docstrings the role of each argument, the description of show_titles
seemed obsolete).
from corner.py.
As a regular corner
user this error makes complete sense to me. Can you tell why this behaviour is not desired?
from corner.py.
Well I have not specified it explicitly in the issue description above, but the problem is that quantiles
is not an argument that requires mandatorily 3 elements as title_quantiles
, here is what the documentation says:
quantiles (iterable) – A list of fractional quantiles to show on the 1-D histograms as vertical dashed lines.
Thus passing a list with arbitrary length should not raise any exception (and it also means that upgrading to corner==2.2.2 breaks codes that were working fine with previous versions).
To clarify even more, here is the expected behaviour if you run the example code above with corner=2.2.1:
import corner
import numpy as np
print (corner.__version__)
ndim, nsamples = 2, 10000
np.random.seed(42)
samples = np.random.randn(ndim * nsamples).reshape([nsamples, ndim])
figure = corner.corner(samples, quantiles=[0.16, 0.84],
show_titles=True, title_quantiles=None)
2.2.1
from corner.py.
I really dont see any problem with this. title_quantiles
and quantiles
are different yet same. And I guess the code changes in 2.2.2
is useful. title_quantiles
of course needs 3 values, else how will you show the mean and std? Morever if your quantiles
is already a 3-vector which is used to draw the dashed lines then just passing show_titles=True
is more than sufficient. In case you only pass 2-vector to quantiles
, the the title_quantiles
needs to passed which should be a 3-vector. One thing that can be done is to default to 1-sigma values if the title_quantiles
is not passed (which internally is None
)
from corner.py.
Related Issues (20)
- Setting the title_quantiles does nothing? HOT 2
- multiple line style for quantiles HOT 2
- Problems with installation HOT 3
- [BUG] Docs for the custom plot are broken HOT 1
- Misplaced **hist_kwargs? HOT 4
- Documentation errantly suggests labels are inferred from pandas.DataFrame columns HOT 4
- axes_scale argument does not work? HOT 2
- range doesn't work, or am I making a mistake? HOT 4
- ValueError: Axis limits cannot be NaN or Inf HOT 3
- Feature add request: interactive plotting using bokeh
- title_quantiles not working? HOT 2
- Matplotlib version [Urgent, maybe] HOT 13
- change colormap HOT 3
- Missing label on first marginalisation HOT 2
- Add option for rotated view of last marginalisation
- Do not mute mutable arguments HOT 1
- reverse=True incompatible with truths HOT 1
- linestyle argument in overlpot_points
- Reference problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corner.py.