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

Weibull subplots #254

Open
GoodLug opened this issue Aug 16, 2023 · 0 comments
Open

Weibull subplots #254

GoodLug opened this issue Aug 16, 2023 · 0 comments

Comments

@GoodLug
Copy link

GoodLug commented Aug 16, 2023

I am trying to plot Weibull plots in a subplot, using code based on that in the Usage documentation for Probability density function (pdf) and fitting Weibull distribution. My relevant code, which uses a loop, is intended to generate ten subplots, one for a particular month in each year in a decade, is as follows:

fig = plt.figure(figsize=(12,8))

for i in range(0, yCount):

 ... get and process the data for the current plot (working fine)...

   ax = fig.add_subplot(3, 4, int(i)+1)
   ax = WindAxes.from_ax()
   ax, params = ax.pdf(df['speed'], bins=8)

The plots get created, but separately, ie not inside the main 'fig' plot, and I end up with 11 Figure windows, one with the main plot with empty rectangles, and 10 with the correct Weibull plots, ie everything is working, I can even access the params, except the subplots don't come out as subplots.

Any advice you can offer?

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

No branches or pull requests

1 participant