Skip to content

Commit

Permalink
Merge pull request #395 from lk-iqt/main
Browse files Browse the repository at this point in the history
Rolling colors for targets
  • Loading branch information
ltindall authored Jan 29, 2024
2 parents 7b48178 + 422393b commit 0a5ee1c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 8 additions & 6 deletions birdseye/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from matplotlib.lines import Line2D
import matplotlib.patheffects as pe
import matplotlib.patches as mpatches
from matplotlib.cm import get_cmap
import numpy as np
import pandas as pd
import requests
Expand Down Expand Up @@ -1099,6 +1100,7 @@ def live_plot(

# Plot targets
if self.target_hist or self.target_gps_hist:
color_map=get_cmap("tab10").colors
if env.simulated:
n_target_hist = env.state.n_targets
else:
Expand All @@ -1124,7 +1126,7 @@ def live_plot(
target_x,
target_y,
linewidth=3.0,
color="black",
color=color_map[t],
zorder=3,
markersize=4,
)
Expand All @@ -1133,8 +1135,8 @@ def live_plot(
target_x[-1],
target_y[-1],
"X",
color="black",
markeredgecolor="black",
color=color_map[t],
markeredgecolor=color_map[t],
# label="Targets",
markersize=8,
zorder=3,
Expand All @@ -1147,7 +1149,7 @@ def live_plot(
target_x[-1],
target_y[-1],
f"{target_class_name}",
color="black",
color=color_map[t],
fontsize=16,
fontweight="bold",
)
Expand All @@ -1158,8 +1160,8 @@ def live_plot(
[0],
marker="X",
color="white",
markerfacecolor="black",
markeredgecolor="black",
markerfacecolor=color_map[t],
markeredgecolor=color_map[t],
label=target_class_name,
markersize=10,
)
Expand Down
3 changes: 3 additions & 0 deletions geolocate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
geolocate:
restart: always
image: iqtlabs/birdseye:latest
build:
context: .
dockerfile: Dockerfile
networks:
- gamutrf
ports:
Expand Down

0 comments on commit 0a5ee1c

Please sign in to comment.