Skip to content
Snippets Groups Projects
Commit 1965e1ab authored by Lan Dam's avatar Lan Dam
Browse files

if sample number is one, even if the setup of the plot is to plot line, still...

if sample number is one, even if the setup of the plot is to plot line, still plot a dot with the same color
parent 283b6b92
No related branches found
No related tags found
1 merge request!151handle plot line when there is only one point
Pipeline #2799 passed with stage
in 4 minutes and 41 seconds
This commit is part of merge request !151. Comments created here will be created in the context of that merge request.
...@@ -269,13 +269,14 @@ class Plotting: ...@@ -269,13 +269,14 @@ class Plotting:
obj, c = cStr.split(':') obj, c = cStr.split(':')
colors[obj] = c colors[obj] = c
l_color = 'G' l_color = 'G'
d_color = 'W'
has_dot = False has_dot = False
if 'L' in colors: if 'L' in colors:
l_color = colors['L'] l_color = colors['L']
if 'D' in colors: if 'D' in colors:
d_color = colors['D'] d_color = colors['D']
has_dot = True has_dot = True
else:
d_color = l_color
if chan_id == 'GPS Lk/Unlk': if chan_id == 'GPS Lk/Unlk':
sample_no_list = [] sample_no_list = []
...@@ -291,7 +292,7 @@ class Plotting: ...@@ -291,7 +292,7 @@ class Plotting:
info=info, y_list=y_list, linked_ax=linked_ax) info=info, y_list=y_list, linked_ax=linked_ax)
for x, y in zip(x_list, y_list): for x, y in zip(x_list, y_list):
if not has_dot: if not has_dot and sample_no_list[0] > 1:
# set marker to be able to click point for info # set marker to be able to click point for info
# but marker's size is small to not show dot. # but marker's size is small to not show dot.
ax.myPlot = ax.plot(x, y, marker='o', markersize=0.01, ax.myPlot = ax.plot(x, y, marker='o', markersize=0.01,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment