Skip to content
Snippets Groups Projects

handle plot line when there is only one point

Merged Lan Dam requested to merge i126_plot_line_w_one_point into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -269,13 +269,14 @@ class Plotting:
obj, c = cStr.split(':')
colors[obj] = c
l_color = 'G'
d_color = 'W'
has_dot = False
if 'L' in colors:
l_color = colors['L']
if 'D' in colors:
d_color = colors['D']
has_dot = True
else:
d_color = l_color
if chan_id == 'GPS Lk/Unlk':
sample_no_list = []
@@ -291,7 +292,7 @@ class Plotting:
info=info, y_list=y_list, linked_ax=linked_ax)
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
# but marker's size is small to not show dot.
ax.myPlot = ax.plot(x, y, marker='o', markersize=0.01,
Loading