MNGuenther / allesfitter

allesfitter is a convenient wrapper around the packages ellc (light curve and RV models), dynesty (static and dynamic nested sampling) emcee (Markov Chain Monte Carlo sampling) and celerite (Gaussian Process models).
MIT License
60 stars 36 forks source link

Customising plots - model kwargs not working #58

Open gdransfield opened 1 year ago

gdransfield commented 1 year ago

Hi Max!

When making custom plots, I noticed that adding kwargs_model had no effect on the plot. There are three lines that need fixing for it to work (at least in the rv and flux plots that I've been doing).

  1. In init.py, line 189 needs to be changed to:

general_output.plot_1(ax, samples, inst, companion, style, base=self, dt=dt, zoomwindow=zoomwindow, force_binning=force_binning, kwargs_data=kwargs_data, kwargs_ax=kwargs_ax, kwargs_model=kwargs_model)

This way it'll be fed into the code.

  1. The 'r-' is hard-coded into the model formatting, so fixing just the above raises an error saying that things are being double-declared (or something). I fixed it by changing lines 680 and 750 in general_output.py to:

ax.plot( xx*zoomfactor, model, **kwargs_model)

I'm on version 1.2.10

Cheers, George