MCPcopy Create free account
hub / github.com/bsomps/OpenGeoPlotter / update_plot

Method update_plot

OGP_v11.py:1253–1285  ·  view source on GitHub ↗
(self, attribute_column)

Source from the content-addressed store, hash-verified

1251 self.update_plot(self.attribute_column)
1252
1253 def update_plot(self, attribute_column):
1254 self.attribute_column = attribute_column
1255 self.generate_contours_flag = False
1256 self.isolate_flag = False
1257 self.bar_column = None
1258
1259 # Reset isolation variables to indicate 'no isolation'
1260 self.isolate_column = None
1261 self.isolate_range = None
1262 self.isolate_value = None
1263
1264
1265 # Check if the y-axis scale factor input is empty
1266 if not self.y_axis_scale_factor_input.text().strip():
1267 # If the input is empty, assume scaling factor is 1
1268 self.y_axis_scale_factor = 1
1269 else:
1270 # If there is an input, use it as the scaling factor
1271 try:
1272 self.y_axis_scale_factor = float(self.y_axis_scale_factor_input.text())
1273 if self.y_axis_scale_factor <= 0:
1274 raise ValueError("Scale factor must be positive")
1275 except ValueError:
1276 # Handle invalid input or reset to default
1277 self.y_axis_scale_factor = 1
1278 QMessageBox.warning(self, "Input Error", "Invalid Y-axis scale factor. Resetting to 1.")
1279
1280 self.plot() # Redraw the plot
1281
1282 self.redraw_image() # Redraw the overlay image after updating the plot
1283
1284 # Close the progress dialog
1285 self.progress_dialog.close()
1286
1287
1288

Callers 1

Calls 2

plotMethod · 0.95
redraw_imageMethod · 0.95

Tested by

no test coverage detected