Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling colors for targets #395

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading