equal
deleted
inserted
replaced
1169 x_min, x_max = start_tick, end_tick |
1169 x_min, x_max = start_tick, end_tick |
1170 y_min, y_max = merge_ranges(ranges) |
1170 y_min, y_max = merge_ranges(ranges) |
1171 |
1171 |
1172 # Display cursor in canvas if a cursor tick is defined and it is |
1172 # Display cursor in canvas if a cursor tick is defined and it is |
1173 # include in values tick range |
1173 # include in values tick range |
1174 if (self.CursorTick is not None and |
1174 if self.CursorTick is not None and \ |
1175 start_tick <= self.CursorTick <= end_tick): |
1175 start_tick <= self.CursorTick <= end_tick: |
1176 |
1176 |
1177 # Define a vertical line to display cursor position if no |
1177 # Define a vertical line to display cursor position if no |
1178 # line is already defined |
1178 # line is already defined |
1179 if self.VLine is None: |
1179 if self.VLine is None: |
1180 self.VLine = self.Axes.axvline(self.CursorTick, |
1180 self.VLine = self.Axes.axvline(self.CursorTick, |
1239 x_data[:, 1][:length], |
1239 x_data[:, 1][:length], |
1240 y_data[:, 1][:length]) |
1240 y_data[:, 1][:length]) |
1241 |
1241 |
1242 # Display cursor in canvas if a cursor tick is defined and it is |
1242 # Display cursor in canvas if a cursor tick is defined and it is |
1243 # include in values tick range |
1243 # include in values tick range |
1244 if (self.CursorTick is not None and |
1244 if self.CursorTick is not None and \ |
1245 start_tick <= self.CursorTick <= end_tick): |
1245 start_tick <= self.CursorTick <= end_tick: |
1246 |
1246 |
1247 # Define a vertical line to display cursor x coordinate |
1247 # Define a vertical line to display cursor x coordinate |
1248 # if no line is already defined |
1248 # if no line is already defined |
1249 if self.VLine is None: |
1249 if self.VLine is None: |
1250 self.VLine = self.Axes.axvline(x_cursor, |
1250 self.VLine = self.Axes.axvline(x_cursor, |
1285 |
1285 |
1286 # Normalize Z coordinate value range |
1286 # Normalize Z coordinate value range |
1287 z_min, z_max = merge_ranges([(z_min, z_max)]) |
1287 z_min, z_max = merge_ranges([(z_min, z_max)]) |
1288 |
1288 |
1289 # Check that x, y and z data are not empty |
1289 # Check that x, y and z data are not empty |
1290 if (x_data is not None and y_data is not None and |
1290 if x_data is not None and \ |
1291 z_data is not None): |
1291 y_data is not None and \ |
|
1292 z_data is not None: |
1292 |
1293 |
1293 # Get common data length so that each value has an x, y |
1294 # Get common data length so that each value has an x, y |
1294 # and z coordinate |
1295 # and z coordinate |
1295 length = min(length, len(z_data)) |
1296 length = min(length, len(z_data)) |
1296 |
1297 |
1299 y_data[:, 1][:length], |
1300 y_data[:, 1][:length], |
1300 zs=z_data[:, 1][:length]) |
1301 zs=z_data[:, 1][:length]) |
1301 |
1302 |
1302 # Display cursor in canvas if a cursor tick is defined and |
1303 # Display cursor in canvas if a cursor tick is defined and |
1303 # it is include in values tick range |
1304 # it is include in values tick range |
1304 if (self.CursorTick is not None and |
1305 if self.CursorTick is not None and \ |
1305 start_tick <= self.CursorTick <= end_tick): |
1306 start_tick <= self.CursorTick <= end_tick: |
1306 |
1307 |
1307 # Get Z coordinate for cursor |
1308 # Get Z coordinate for cursor |
1308 z_cursor, z_forced = items[2].GetValue( |
1309 z_cursor, z_forced = items[2].GetValue( |
1309 self.CursorTick, raw=True) |
1310 self.CursorTick, raw=True) |
1310 |
1311 |