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

Plot with legend_label option to remove BokehDeprecationWarnings #132

Merged
merged 2 commits into from
Aug 24, 2023
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
8 changes: 4 additions & 4 deletions jupyterlab_nvdashboard/apps/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def resource_timeline(doc):
x_range=x_range,
tools=tools,
)
disk_fig.line(source=source, x="time", y="disk-read", color="blue", legend="Read")
disk_fig.line(source=source, x="time", y="disk-write", color="red", legend="Write")
disk_fig.line(source=source, x="time", y="disk-read", color="blue", legend_label="Read")
disk_fig.line(source=source, x="time", y="disk-write", color="red", legend_label="Write")
disk_fig.yaxis.formatter = NumeralTickFormatter(format="0.0b")
disk_fig.legend.location = "top_left"

Expand All @@ -96,8 +96,8 @@ def resource_timeline(doc):
x_range=x_range,
tools=tools,
)
net_fig.line(source=source, x="time", y="net-read", color="blue", legend="Recv")
net_fig.line(source=source, x="time", y="net-sent", color="red", legend="Send")
net_fig.line(source=source, x="time", y="net-read", color="blue", legend_label="Recv")
net_fig.line(source=source, x="time", y="net-sent", color="red", legend_label="Send")
net_fig.yaxis.formatter = NumeralTickFormatter(format="0.0b")
net_fig.legend.location = "top_left"

Expand Down
8 changes: 4 additions & 4 deletions jupyterlab_nvdashboard/apps/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ def _get_color(ind):
tools=tools,
)
tot_fig.line(
source=source, x="time", y="gpu-total", color="blue", legend="Total-GPU"
source=source, x="time", y="gpu-total", color="blue", legend_label="Total-GPU"
)
tot_fig.line(
source=source, x="time", y="memory-total", color="red", legend="Total-Memory"
source=source, x="time", y="memory-total", color="red", legend_label="Total-Memory"
)
tot_fig.legend.location = "top_left"

Expand All @@ -502,8 +502,8 @@ def _get_color(ind):
x_range=x_range,
tools=tools,
)
pci_fig.line(source=source, x="time", y="tx-total", color="blue", legend="TX")
pci_fig.line(source=source, x="time", y="rx-total", color="red", legend="RX")
pci_fig.line(source=source, x="time", y="tx-total", color="blue", legend_label="TX")
pci_fig.line(source=source, x="time", y="rx-total", color="red", legend_label="RX")
pci_fig.yaxis.formatter = NumeralTickFormatter(format="0.0 b")
pci_fig.legend.location = "top_left"
figures.append(pci_fig)
Expand Down