Skip to content

Conversation

@zhang-ivy
Copy link
Contributor

@zhang-ivy zhang-ivy commented Jan 25, 2023

Description

Allow user to control the size of the markers (and other arguments) in plt.scatter()

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Introduces scatter_kwargs argument to plotting._master_plot

Status

  • Ready to go

@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Merging #78 (840ce0f) into main (f1345d9) will increase coverage by 0.07%.
The diff coverage is 0.00%.

Additional details and impacted files

@zhang-ivy
Copy link
Contributor Author

@mikemhenry or @ijpulidos : Could you review this?

statistic_type : str, default 'mle'
the type of statistic to use, either 'mle' (i.e. sample statistic)
or 'mean' (i.e. bootstrapped mean statistic)
marker_size : float, default 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted to say that this point you really should be just passing in a dictionary of kwargs for matplotlib's scatter rather than incrementally adding new kwargs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I just pushed changes to address this suggestion. Let me know what you think

@zhang-ivy zhang-ivy changed the title Allow control of marker size in plt.scatter Allow control of marker size (and other aspects of plt.scatter) Jan 30, 2023
bootstrap_x_uncertainty: bool = False,
bootstrap_y_uncertainty: bool = False,
statistic_type: str = "mle",
scatter_kwargs: dict = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth keeping s=10 and marker='o' as the defaults here? That way you have the same behaviour as before just with a little bit extra control?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one thing so I'll approve since it's just docs. @mikemhenry could you double check (sorry my brain is all mushy from this cold)?

statistic_type : str, default 'mle'
the type of statistic to use, either 'mle' (i.e. sample statistic)
or 'mean' (i.e. bootstrapped mean statistic)
scatter_kwargs : dict, default {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the default value here too please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry about that. Done

Copy link
Collaborator

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mikemhenry mikemhenry merged commit 0f10e11 into OpenFreeEnergy:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants