Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in plot api, pass fig and ax to give more control to the user's code #13

Merged
merged 1 commit into from Sep 30, 2021

Conversation

ksachdeva
Copy link
Contributor

Thanks for this great library.

Purpose of this modification:
I have been using it with a multivariate time series dataset. Each dimension gets its own plot and wanted to make use of subplots to see all the dimensions at the same time (in a grid for e.g.)

Notes:
a) I have added fig as the parameter to the plotting API as well. Generally, it is not required. I have done it so as to not create a situation where the number of return values is 1. This way your function always return 2 values (the tuple).

b) Instead of using plt.xlim and plt.ylim, I am using ax.set_xlim & ax.set_ylim. This should work for previous version and for this modification as well.

c) For now if the method is 'discrete' then passed fig and axes are ignored since the plot_binom function creates subplots internally.

@erdogant
Copy link
Owner

Thank you! Great contribution!

@erdogant erdogant merged commit 9d116cc into erdogant:master Sep 30, 2021
@erdogant
Copy link
Owner

erdogant commented Oct 1, 2021

You can update to latest version using:

pip install -U distfit

Thank you!

@ksachdeva
Copy link
Contributor Author

Much appreciated @erdogant and many thanks for this wonderful library.

regards
Kapil

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.

None yet

2 participants