Skip to content

Commit

Permalink
Merge pull request #93 from lsst/tickets/PREOPS-5239
Browse files Browse the repository at this point in the history
PREOPS-5239: Switch schedview from using bokeh.plotting.figure.circle to bokeh.plotting.figure.scatter with marker=circle
  • Loading branch information
ehneilsen authored Jun 18, 2024
2 parents 179ab92 + 1f5c579 commit 0bf5431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions schedview/plot/overhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ def plot_overhead_vs_slew_distance(visits, plot=None, **kwargs):
x_axis_label="slew distance (deg.)",
)

circle_kwargs = {"color": PLOT_FILTER_CMAP, "fill_alpha": 0.3}
circle_kwargs = {"color": PLOT_FILTER_CMAP, "fill_alpha": 0.3, "marker": "circle"}
circle_kwargs.update(kwargs)

for band in PLOT_FILTER_CMAP.transform.factors:
these_visits = visits.query(f'filter == "{band}"')

if len(these_visits) > 0:
plot.circle(
plot.scatter(
x="slewDistance", y="overhead", source=these_visits, legend_label=band, **circle_kwargs
)

Expand Down
4 changes: 2 additions & 2 deletions schedview/plot/visits.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ def plot_visit_param_vs_time(visits, column_name, plot=None, **kwargs):
if plot is None:
plot = bokeh.plotting.figure(y_axis_label=column_name, x_axis_label="Time (UTC)")

circle_kwargs = {"fill_alpha": 0.3}
circle_kwargs = {"fill_alpha": 0.3, "marker": "circle"}
circle_kwargs.update(kwargs)

for band in PLOT_FILTER_CMAP.transform.factors:
these_visits = visits.query(f'filter == "{band}"')
if len(these_visits) > 0:
plot.circle(
plot.scatter(
x="start_date",
y=column_name,
color=PLOT_FILTER_CMAP,
Expand Down

0 comments on commit 0bf5431

Please sign in to comment.