<s> '''<STR_LIT>''' <EOL> from __future__ import division <EOL> import math <EOL> import matplotlib . pyplot as plt <EOL> import numpy as np <EOL> import stylers <EOL> import husl <EOL> def husl_gen ( ) : <EOL> '''<STR_LIT>''' <EOL> hue = np . random . randint ( <NUM_LIT:0> , <NUM_LIT> ) <EOL> saturation , lightness = np . random . randint ( <NUM_LIT:0> , <NUM_LIT:100> , <NUM_LIT:2> ) <EOL> husl_dark = husl . husl_to_hex ( hue , saturation , lightness / <NUM_LIT:3> ) <EOL> husl_light = husl . husl_to_hex ( hue , saturation , lightness ) <EOL> return husl_dark , husl_light <EOL> def wind_rose ( freqs , sectors = <NUM_LIT:12> , title = '<STR_LIT>' , color = None , <EOL> all_ticks = False ) : <EOL> '''<STR_LIT>''' <EOL> bins = <NUM_LIT> / sectors <EOL> theta = np . arange ( <NUM_LIT:0> , <NUM_LIT> , bins ) <EOL> theta_rad = theta * math . pi / <NUM_LIT> <EOL> if all_ticks : <EOL> ticklabs = [ str ( x ) for x in theta ] <EOL> ticks = theta <EOL> else : <EOL> ticklabs , ticks = np . arange ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:30> ) , np . arange ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:30> ) <EOL> fig = plt . figure ( figsize = ( <NUM_LIT:8> , <NUM_LIT:8> ) ) <EOL> ax = fig . add_axes ( [ <NUM_LIT:0.1> , <NUM_LIT:0.1> , <NUM_LIT> , <NUM_LIT> ] , polar = True ) <EOL> ax . set_theta_zero_location ( '<STR_LIT:N>' ) <EOL> ax . set_theta_direction ( - <NUM_LIT:1> ) <EOL> ax . set_thetagrids ( ticks , labels = ticklabs ) <EOL> ax . set_title ( title ) <EOL> ax . grid ( True , '<STR_LIT>' , color = '<STR_LIT:w>' , linestyle = '<STR_LIT:->' , linewidth = <NUM_LIT> ) <EOL> ax . patch . set_facecolor ( '<STR_LIT>' ) <EOL> ax . set_axisbelow ( True ) <EOL> width = bins * math . pi / <NUM_LIT> <EOL> adj_theta = theta_rad - width / <NUM_LIT:2> <EOL> stylers . rbar ( ax , adj_theta , freqs , width = width , bottom = <NUM_LIT:0.0> , alpha = <NUM_LIT> , <EOL> color = color ) <EOL> def weibull ( x , dist , binned = False , binned_x = None , binned_data = None , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> fig , ax1 = plt . subplots ( ) <EOL> ax2 = None <EOL> if binned : <EOL> bin_width = binned_x [ <NUM_LIT:1> ] - binned_x [ <NUM_LIT:0> ] <EOL> stylers . rbar ( ax1 , binned_x , binned_data , width = bin_width , ** kwargs ) <EOL> stylers . rstyle ( ax1 ) <EOL> ax1 . set_xlabel ( r'<STR_LIT>' , fontsize = <NUM_LIT:12> ) <EOL> ax1 . set_ylabel ( r'<STR_LIT>' , fontsize = <NUM_LIT:12> ) <EOL> ax2 = ax1 . twinx ( ) <EOL> if ax2 : <EOL> pdfax = ax2 <EOL> else : <EOL> pdfax = ax1 <EOL> pdfax . set_xlim ( ( <NUM_LIT:0> , <NUM_LIT> ) ) <EOL> stylers . rfill ( pdfax , x , dist , ) <EOL> if not ax2 : <EOL> stylers . rstyle ( pdfax ) <EOL> pdfax . set_ylabel ( r'<STR_LIT>' , fontsize = <NUM_LIT:12> ) </s>
