When attempting to plot a variable (vertical cross section) whose min and max values are equal (e.g. both 0), PyTelTools crashes. Here is the traceback:
Traceback (most recent call last):
File "D:\SOFTWARE\PyTelTools\src\pyteltools\PyTelTools\workflow\mono_gui.py", line 148, in mouseDoubleClickEvent
node.configure()
File "D:\SOFTWARE\PyTelTools\src\pyteltools\PyTelTools\workflow\nodes_vis.py", line 989, in configure
if not self._prepare():
File "D:\SOFTWARE\PyTelTools\src\pyteltools\PyTelTools\workflow\nodes_vis.py", line 1023, in _prepare
self.plot_viewer.get_data(input_data, sections, line_interpolators_internal, section_indices)
File "D:\SOFTWARE\PyTelTools\src\pyteltools\PyTelTools\workflow\util.py", line 1174, in get_data
self.replot()
File "D:\SOFTWARE\PyTelTools\src\pyteltools\PyTelTools\workflow\util.py", line 1142, in replot
extend='both')
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\axes\_axes.py", line 7677, in tricontourf
return mtri.tricontourf(self, *args, **kwargs)
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\tri\tricontour.py", line 283, in tricontourf
return TriContourSet(ax, *args, **kwargs)
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\tri\tricontour.py", line 40, in __init__
ContourSet.__init__(self, ax, *args, **kwargs)
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\contour.py", line 853, in __init__
kwargs = self._process_args(*args, **kwargs)
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\tri\tricontour.py", line 51, in _process_args
tri, z = self._contour_args(args, kwargs)
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\tri\tricontour.py", line 94, in _contour_args
self._contour_level_args(z, args[1:])
File "D:\SOFTWARE\PyTelTools\lib\site-packages\matplotlib\contour.py", line 1190, in _contour_level_args
raise ValueError("Contour levels must be increasing")
ValueError: Contour levels must be increasing
I was able to work around this by adding some code to artificially increase the max value in replot(), but I'm sure there is a more elegant way of handling this.