Skip to content

analysis: Allow optional annotation of plot_tradeoff graphs#123

Merged
quaquel merged 1 commit intoquaquel:masterfrom
EwoutH:annotated_tradeoff
May 18, 2022
Merged

analysis: Allow optional annotation of plot_tradeoff graphs#123
quaquel merged 1 commit intoquaquel:masterfrom
EwoutH:annotated_tradeoff

Conversation

@EwoutH
Copy link
Copy Markdown
Collaborator

@EwoutH EwoutH commented May 12, 2022

Allow to annotate the points of plot_tradeoff graphs (which use peeling_trajectory DataFrames) with id labels. Add the optional annotated parameter with value True to do so (by default it's False, replicating current behaviour.

This makes it easy to quickly identify points on the tradeoff graphs which look interesting. Works best with large graphs (using Figure.set_size_inches).

Example usage:

from ema_workbench.analysis import prim

x = experiments
y = outcomes["max_P"] < 0.8
prim_alg = prim.Prim(x, y, threshold=0.8)
box1 = prim_alg.find_box()
box1.peeling_trajectory["id"] = box1.peeling_trajectory["id"].astype(int).astype(str)

fig = box1.show_tradeoff(annotated=True)
fig.set_size_inches((20,10))
fig.show()

peeling-trajectory-annotated

Allow to annotate the points of plot_tradeoff graphs (which use peeling_trajectory DataFrames) with id labels.

This makes it easy to quickly identify points on the tradeoff graphs which look interesting. Works best with large graphs (using "fig.set_size_inches").
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.03%) to 80.44% when pulling aed87b5 on EwoutH:annotated_tradeoff into 6f4a4ae on quaquel:master.

@EwoutH
Copy link
Copy Markdown
Collaborator Author

EwoutH commented May 16, 2022

@quaquel What do you think of such a feature?

@quaquel
Copy link
Copy Markdown
Owner

quaquel commented May 16, 2022

It's a good and useful addition. Just need time to integrate this and update any associated test code

@quaquel quaquel merged commit b3bd024 into quaquel:master May 18, 2022
@EwoutH EwoutH mentioned this pull request May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants