Closed vivekvenkris closed 11 months ago
Sounds like a useful feature, I'll see if I can add it in in the next few days. In the meantime as a hack solution, you have the fig object back from plotter, so could grab its axes and set the axis scale to log manually. But hopefully I can give a more elegant solution soon! :)
There's now a log_scales
keyword for the plotting functions in v0.29.0 that you can update to:
https://samreay.github.io/ChainConsumer/examples/customisations/plot_logscale.html
Great, thanks!
Hi, I find this new feature very useful but it seems to have a bug it the display of the y-axis ticks when you want to plot several variables :
How frustrating, I'll chase that down ASAP!
On Wed, 11 Sep 2019, 7:25 pm martin-millon, notifications@github.com wrote:
Hi, I find this new feature very useful but it seems to have a bug it the display of the y-axis ticks when you want to plot several variables : conerplot.pdf https://github.com/Samreay/ChainConsumer/files/3599975/conerplot.pdf
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Samreay/ChainConsumer/issues/71?email_source=notifications&email_token=ABTPSWJJMJNLFL6BPHORCNDQJC2PPA5CNFSM4ITDBY42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6N3Q4A#issuecomment-530298992, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTPSWKZYTLI5SYB53ESNNDQJC2PPANCNFSM4ITDBY4Q .
Any chance I can grab the code used to make that plot? Ive tried playing around with multiple chains, multiple parameters in log scale, and can't reproduce it. The configure
method you've used might help reveal the source of the issue for me!
I did not call configure()
explicitly. Here is what I used :
latex_params = ['$\Theta_E$', '$\gamma$', 'ellipticity', '$M_{BH}$', '$\gamma_{ext}$', '$R_{sersic}$','$n_{sersic}$' ]
CC = ChainConsumer()
CC.add_chain(reduced_samples, parameters=latex_params)
fig = CC.plotter.plot(figsize='PAGE', display=True, filename='figures/conerplot.png', log_scales = [False, False, False, True, False, False, False])
I am using matplotlib 3.1.1, chainconsumer 0.29.0, numpy 1.16.3
Just updated matplotlib to the same version, installed removed and reinstalled chainconsumer using pip, using the exact latex parameters and invocation of plotter, and I still can't get it to reproduce.
However, I've added some extra code that should explicitly turn off the tick labels, so update to v0.29.1 and let me know if that works! Fingers crossed.
No, I upgraded to 0.29.1, and it does not solve the issue. It is really weird because I have the problem only for the y-axis on the interactive figure but on both axes when I save it in png...
Thanks for trying, I can just do a temporary fix by taking the log of the chain for the moment and we will see if this is just happening to me or if other people have the same issue.
Hi,
I use v0.31, and I think I found a potential bug in this log-scale feature.
It looks like passing log_scale
argument indeed makes an axis be in log scale, but the binning is still done with linear scale. So what happened was that 1D histograms and contours in 2D histogram are quite different from the ones when I disabled the log_scale
argument and just passed logarithmic param values to add_chain()
.
Would it be easy for you to fix this binning scheme? This feature is already great and would be perfect with this bug fixed.
BTW, thank you so much for this wonderful package and actively developing additional features like this.
Hey mate! Sorry for the delay getting back to you, but given the generalisation of the binning being independent to the axis formatting, I'm a bit hesitant to change the way the API behaves in this context, because changing the binning has differing impacts on parameter estimation depending on what statistics you request.
My recommendation would have been to do exactly what you've already figured out - log the parameters before passing them to chainconsumer, which allows chainconsumer to treat everything in the same fashion.
Hoping that matplotlib has fixed the Ntickfinder working with log scale
Hi, I was wondering if it is possible to provide a feature where I can provide log=["x","y"] to the plottter.plot() and they are plotted on a log scale instead? This is helpful for distributions with a super long tail.
A workaround now is to just change the input chain to log, but that will give me axis as 1,2,3 and not 10,100 and 1000 -- which is more readable.