Skip to content

Weibull subplots #254

@GoodLug

Description

@GoodLug

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions