Error with Pairs Plotting when loading results #273
Unanswered
sftorres405
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
Can you share the code you used for generating the results and the version number of the ema_workbench? I tried replicating the error and have failed to do so with the latest code from master. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
You're using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Kind greetings,
I have been playing with the lake problem example and encountered a rather annoying bug. When using the pairs_plotting.pairs_scatter function on results recently generated, it works as expected. However, if I save the results, load them, and then try to plot them I get the following error:
TypeError Traceback (most recent call last)
in <cell line: 4>()
2 from ema_workbench.analysis import pairs_plotting
3
----> 4 fig, axes = pairs_plotting.pairs_scatter(experiments, outcomes, group_by="policy", legend=False)
5 fig.set_size_inches(8, 8)
6 plt.show()
3 frames
/usr/local/lib/python3.10/dist-packages/ema_workbench/analysis/pairs_plotting.py in pairs_scatter(experiments, outcomes, outcomes_to_show, group_by, grouping_specifiers, ylabels, legend, point_in_time, filter_scalar, **kwargs)
443 _logger.debug("generating pairwise scatter plot")
444
--> 445 prepared_data = prepare_pairs_data(
446 experiments,
447 outcomes,
/usr/local/lib/python3.10/dist-packages/ema_workbench/analysis/plotting_util.py in prepare_pairs_data(experiments, outcomes, outcomes_to_show, group_by, grouping_specifiers, point_in_time, filter_scalar)
675 raise EMAError("for pair wise plotting, more than one outcome needs to be provided")
676
--> 677 experiments, outcomes, outcomes_to_show, time, grouping_labels = prepare_data(
678 experiments, None, outcomes, outcomes_to_show, group_by, grouping_specifiers, filter_scalar
679 )
/usr/local/lib/python3.10/dist-packages/ema_workbench/analysis/plotting_util.py in prepare_data(experiments, experiments_to_show, outcomes, outcomes_to_show, group_by, grouping_specifiers, filter_scalar)
762 grouping_specifiers = set(column_to_group_by)
763 else:
--> 764 grouping_specifiers = make_continuous_grouping_specifiers(
765 column_to_group_by, grouping_specifiers
766 )
/usr/local/lib/python3.10/dist-packages/ema_workbench/analysis/plotting_util.py in make_continuous_grouping_specifiers(array, nr_of_groups)
644 minimum = np.min(array)
645 maximum = np.max(array)
--> 646 step = (maximum - minimum) / nr_of_groups
647 a = [(minimum + step * x, minimum + step * (x + 1)) for x in range(nr_of_groups)]
648 assert a[0][0] == minimum
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'
Any help on how to solve this issue would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions