Comments (5)
Hi Manodeep,
Ah, whats happening is that ChainConsumer (atm) only allows configure to be called once (and after all chains are loaded in). It is the repeated calls to it that break it, so I would restructure the code such that each chainconsumer instance is only configured once. So if you are just trying to generate plots with different subgroups of parameters, you can configure it once, outside the second for
loop, and then call plotter.plot
with different lists of parameters.
Also, there is no need to pass in lists of the same option, single options will apply to all chains (ie kde=[False] * nchains
is the same as kde=False
, which is also the same as not specifying it because kde=False
is the default behaviour).
from chainconsumer.
Sorry about the mis-leading with the nchains
multiplication, I was trying to solve the assertion error. I hacked my way around the TypeError
by checking if the self.config
was an empty dict
; and if so, creating a list of validated keys. That solved my issue - but I have no idea about the side-effects.
I had the configure right after I called ChainConsumer
(before loading the chians). However, then the config options did not seem to take effect; that's why I put the configure
within the plotting loop. Just to be clear, if I only call configure
after all chains are loaded and before the plotting loop - all should be good?
Thanks again for the quick response.
from chainconsumer.
Ah right, that makes sense. As to resetting config to an empty dict, that should be fine so long as you also set the configured boolean flag to false.
But yeah, from the doco: "Please ensure that you call this method after adding all the relevant data to the chain consumer, as the consume changes configuration values depending on the supplied data."
Some things (like whether or not to shade by default, the opacity of the shaded contours, whether to switch colouring to rainbow, etc) are dependent on the number of chains loaded in, hence the stipulation to call configure (once), after all data has been loaded.
from chainconsumer.
Fantastic - thanks! Sorry I missed that one from the docs.
from chainconsumer.
No worries mate, glad its an easy fix!
from chainconsumer.
Related Issues (20)
- ImportError: cannot import name 'Chain' from 'chainconsumer' HOT 2
- Plot truth in marginal distributions HOT 2
- [Bug] Wrong count of `walkers` after the chain division
- Plot of contour is getting cut. HOT 9
- Chain labels/legends when using `plot_contour`. HOT 2
- Problems with `typing_extensions` HOT 2
- Different renderer for summary text and axis labels HOT 1
- Chain straight from dict / chain from numpyro with only certain fields HOT 7
- [Bug] Wrong type returned by `get_bins` HOT 1
- Removing certain entries from legends
- Add a weight option to chainconsumer
- Update CI and package management HOT 5
- Chain.from_arviz does not handle multidimensional variables
- legend not showing and axis labels not using latex format HOT 2
- Bad parameter label visualization and 1D contours not matching 2D ones HOT 2
- Mathtex parsing bugs HOT 1
- Feature request : Option to parse a custom fig instance HOT 2
- How to change tick width and height in the corner plots ? HOT 1
- adding yaxis label to distribution plots
- Title bug when `display=True` HOT 2
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 chainconsumer.