From 73c4bc1ab0158b66c1548271e87162d76d4a478d Mon Sep 17 00:00:00 2001 From: Henry Leung Date: Tue, 2 Jan 2024 11:57:52 -0500 Subject: [PATCH] fix s kwargs get ignored if specified --- mw_plot/mw_plot_bokeh.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mw_plot/mw_plot_bokeh.py b/mw_plot/mw_plot_bokeh.py index 8c18bbf..0c84fd7 100644 --- a/mw_plot/mw_plot_bokeh.py +++ b/mw_plot/mw_plot_bokeh.py @@ -4,17 +4,16 @@ raise ImportError( "Bokeh is not installed. Please install Bokeh to use this feature" ) +else: + from bokeh.plotting import figure, show + from bokeh.io import output_file, save, output_notebook + from bokeh.models import Range1d import requests import numpy as np import astropy.units as u -import astropy.coordinates as coord from mw_plot.mw_plot_masters import MWPlotMaster, MWSkyMapMaster -from bokeh.plotting import figure, show -from bokeh.io import output_file, save, output_notebook -from bokeh.models import Range1d - def to_bokeh_img(imgarray): M, N, _ = imgarray.shape @@ -149,7 +148,7 @@ def scatter(self, x, y, *args, **kwargs): self.bokeh_fig.circle(x, y, radius=kwargs["r"]) return kwargs["s"] = self.s - self.bokeh_fig.circle(x, y, size=self.s) + self.bokeh_fig.circle(x, y, size=kwargs["s"]) def show(self, notebook=True): if self._in_jupyter and notebook: @@ -270,7 +269,7 @@ def scatter(self, ra, dec, *args, **kwargs): self.bokeh_fig.circle(ra, dec, radius=kwargs["r"]) return kwargs["s"] = self.s - self.bokeh_fig.circle(ra, dec, size=self.s) + self.bokeh_fig.circle(ra, dec, size=kwargs["s"]) def show(self, notebook=True): if self._in_jupyter and notebook: