Skip to content

Trying to set x-limits on my posterior plot #115

Closed Answered by Samreay
sohinixcvii asked this question in Q&A
Discussion options

You must be logged in to vote

So I did find an issue with the latest version of Chainconsumer in this, but it wasn't to do with the extents. Also, you may have your environment misconfigured, because the code you provided only works on ChainConsumer <1 (as you note with the failing import)

If you update to 1.0.3, this code should give you what you want:

import pandas as pd

from chainconsumer import Chain, ChainConsumer, PlotConfig, Truth

df = pd.read_csv("pk50.log", sep=r"\s+", header=None, names=["mass", "something"])
chain = Chain(samples=df[["mass"]], name="CV+noise", color="#F28482")

df_truth = pd.read_csv("params_LH.txt", sep=r"\s+", header=None, names=["mass", "something"])
truth = Truth(location={"mass": df_…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sohinixcvii
Comment options

Answer selected by Samreay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants