Closed patel999jay closed 1 year ago
Thanks for the detailed report on what will need to be changed. I'm personally using very little Python nowadays and so have not been following Bokeh updates. Would you be open to making relevant changes and raising a PR @patel999jay ?
@mchitre : i reviewed the issue, and created a PR, ready to merge.
Hi, I also had this issue and also had to change plot_height=height
to height=height
Did you have this too @patel999jay ?
Hi, I also had this issue and also had to change
plot_height=height
toheight=height
Yes, see https://github.com/org-arl/arlpy/blob/acb1b7abc815885f8825d8ca2f1910d44ecd0086/arlpy/plot.py#L61
Hello,
I've been using the arlpy toolbox and recently updated Bokeh from version 2.x.x to 3.1.1. After the update, I've encountered some issues with the plotting functions in arlpy.
When running
pm.plot_env(env, width=900)
, I get the following error:AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width
This suggests that the attribute 'plot_width' is no longer recognized by the Bokeh Figure object in version 3.1.1. Instead, the 'width' attribute should be used.
When running
rays = pm.compute_eigenrays(env , debug=True)
andpm.plot_rays(rays, env=env, width=900)
, I get this error:ValueError: failed to validate FigureOptions(...).x_range: expected an element of either Instance(Range), Either(Tuple(Float, Float), Tuple(Datetime, Datetime), Tuple(TimeDelta, TimeDelta)), Seq(String), Object(Series) or Object(GroupBy), got None
This error suggests that the 'x_range' attribute of the Bokeh Figure object is not being set correctly in the arlpy plotting functions.
These issues seem to be related to changes in the Bokeh API between version 2.x.x and 3.1.1. To resolve these, the arlpy library would need to be updated to use the new Bokeh API. This would involve updating any instances where Bokeh figures are created or modified in the arlpy code.
Please note that these changes may/could potentially break compatibility with older versions of Bokeh. (not tested yet) Therefore, it might be necessary to implement some sort of version checking to ensure that the correct API is used depending on the installed version of Bokeh.
Here is an example of the required change:
Current code in
plot.py
:should be updated to :
Please note that other instances where
plot_width
is used should also be replaced withwidth
. I did not get a chance to look at all instances of the same in repo yet.