Open kelle opened 1 year ago
This sounds like an sedkit issue for @hover2pi
Yeah, I don't have it pass any kwargs to the figure
yet unfortunately. This is super simple though and I'll make it so that the user can talk directly to the bokeh
plot. I made this an issue in sedkit
.
Oh, as a workaround though, I think you can create a bokeh figure first, set the x_range
, and then pass the figure to the fig
argument in the sed.plot
method. I haven't tried this but I think it might work. E.g.
from bokeh.plotting import figure
from sedkit import SED
s = SED()
... SED stuff here...
my_fig = figure(x_range=(0.5, 2.5))
s.plot(fig=my_fig)
Oh! Wait, the plot is stored as s.fig
when you run s.plot
so you can just make your plot as usual then modify the range afterward with, e.g.
s.plot()
from bokeh.models import Range1d
from bokeh.plotting import show
s.fig.y_range = Range1d(0, 15)
show(s.fig)
I thought there was gonna be an "easy" workaround. Could the access to the fig object be added to the sedkit plot documentation? If you point me to it, I can also open a PR with this change.
Kelle
Sometimes, s.plot doesn't give the desired y range. Is there a way to set the y Max using sedkits plot method. We tried y_range but did not get the desired outcome. (Use case CFBDS J003402-005206)