Skip to content

Bug in histogram plotter #12527

@frode-aarstad

Description

@frode-aarstad

What happened? (You can include a screenshot if it helps explain)

Got the following in the terminal:


An error occurred during plotting. This stack trace is helpful for diagnosing the problem.--------------------------------------------------------------------------------
File "/Users/FAAR/code/ert/src/ert/gui/tools/plot/plot_widget.py", line 201, in updatePlot
self._plotter.plot(
File "/Users/FAAR/code/ert/src/ert/gui/tools/plot/plottery/plots/histogram.py", line 36, in plot
plotHistogram(figure, plot_context, ensemble_to_data_map)
File "/Users/FAAR/code/ert/src/ert/gui/tools/plot/plottery/plots/histogram.py", line 129, in plotHistogram
_plotHistogram(
File "/Users/FAAR/code/ert/src/ert/gui/tools/plot/plottery/plots/histogram.py", line 197, in _plotHistogram
bins = _histogramLogBins(effective_bin_count, minimum, maximum) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/FAAR/code/ert/src/ert/gui/tools/plot/plottery/plots/histogram.py", line 219, in _histogramLogBins
minimum = log10(float(minimum))
^^^^^^^^^^^^^^^^^^^^^
Exception type: ValueError
math domain error

What did you expect to happen?

Nothing in the terminal

Steps to reproduce

Run snake_oil esmda
In the plotter select ensemble_3 and SNAKE_OIL_PARAM:OP1_OFFSET
Press the logscale button in the histogram plot

Environment where bug has been observed

  • Python 3.11
  • Python 3.12
  • macOS
  • RHEL8
  • RHEL9
  • Local queue
  • LSF queue
  • Slurm queue
  • OpenPBS queue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions