<s> from . theme import theme <EOL> import matplotlib as mpl <EOL> import matplotlib . pyplot as plt <EOL> from numpy import isreal <EOL> class theme_seaborn ( theme ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , style = "<STR_LIT>" , gridweight = None , context = "<STR_LIT>" ) : <EOL> super ( theme_seaborn , self ) . __init__ ( complete = True ) <EOL> self . style = style <EOL> self . gridweight = gridweight <EOL> self . context = context <EOL> self . _set_theme_seaborn_rcparams ( self . _rcParams , self . style , self . gridweight , self . context ) <EOL> def _set_theme_seaborn_rcparams ( self , rcParams , style , gridweight , context ) : <EOL> """<STR_LIT>""" <EOL> gridweights = { <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT:0.5> , <EOL> } <EOL> if gridweight is None : <EOL> if context == "<STR_LIT>" : <EOL> glw = gridweights [ "<STR_LIT>" ] <EOL> else : <EOL> glw = gridweights [ '<STR_LIT>' ] <EOL> elif isreal ( gridweight ) : <EOL> glw = gridweight <EOL> else : <EOL> glw = gridweights [ gridweight ] <EOL> if style == "<STR_LIT>" : <EOL> lw = <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT> <EOL> ax_params = { "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : "<STR_LIT:w>" , <EOL> "<STR_LIT>" : "<STR_LIT:->" , <EOL> "<STR_LIT>" : glw } <EOL> elif style == "<STR_LIT>" : <EOL> lw = <NUM_LIT:1.0> if context == "<STR_LIT>" else <NUM_LIT> <EOL> ax_params = { "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : lw , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT:->" , <EOL> "<STR_LIT>" : glw } <EOL> elif style == "<STR_LIT>" : <EOL> ax_params = { "<STR_LIT>" : False , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : <NUM_LIT:1> } <EOL> elif style == "<STR_LIT>" : <EOL> ticksize = <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT> <EOL> tickwidth = <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT:1> <EOL> ax_params = { "<STR_LIT>" : False , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : tickwidth , <EOL> "<STR_LIT>" : tickwidth , <EOL> "<STR_LIT>" : tickwidth , <EOL> "<STR_LIT>" : tickwidth , <EOL> "<STR_LIT>" : ticksize , <EOL> "<STR_LIT>" : ticksize / <NUM_LIT:2> , <EOL> "<STR_LIT>" : ticksize , <EOL> "<STR_LIT>" : ticksize / <NUM_LIT:2> } <EOL> rcParams . update ( ax_params ) <EOL> if context == "<STR_LIT>" : <EOL> font_params = { "<STR_LIT>" : <NUM_LIT:16> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> } <EOL> elif context == "<STR_LIT>" : <EOL> font_params = { "<STR_LIT>" : <NUM_LIT:11> , <EOL> "<STR_LIT>" : <NUM_LIT:12> , <EOL> "<STR_LIT>" : <NUM_LIT:10> , <EOL> "<STR_LIT>" : <NUM_LIT:10> , <EOL> "<STR_LIT>" : <NUM_LIT:10> , <EOL> } <EOL> elif context == "<STR_LIT>" : <EOL> font_params = { "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT:16> , <EOL> "<STR_LIT>" : <NUM_LIT:16> , <EOL> "<STR_LIT>" : <NUM_LIT:16> , <EOL> } <EOL> elif context == "<STR_LIT>" : <EOL> font_params = { "<STR_LIT>" : <NUM_LIT:8> , <EOL> "<STR_LIT>" : <NUM_LIT:12> , <EOL> "<STR_LIT>" : <NUM_LIT:8> , <EOL> "<STR_LIT>" : <NUM_LIT:8> , <EOL> "<STR_LIT>" : <NUM_LIT:8> , <EOL> } <EOL> rcParams . update ( font_params ) <EOL> rcParams . update ( { <EOL> "<STR_LIT>" : <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT:7> , <EOL> "<STR_LIT>" : <NUM_LIT> if context == "<STR_LIT>" else <NUM_LIT:7> , <EOL> } ) <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT:True>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> rcParams [ "<STR_LIT>" ] = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> rcParams [ "<STR_LIT>" ] = [ "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ] <EOL> rcParams [ "<STR_LIT>" ] = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT:True>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT:1.0>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> rcParams [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> def apply_theme ( self , ax ) : <EOL> """<STR_LIT>""" <EOL> for child in ax . get_children ( ) : <EOL> if isinstance ( child , mpl . spines . Spine ) : <EOL> child . set_alpha ( <NUM_LIT:0> ) <EOL> for line in ax . get_xticklines ( ) + ax . get_yticklines ( ) : <EOL> line . set_markersize ( <NUM_LIT:5> ) <EOL> line . set_markeredgewidth ( <NUM_LIT> ) <EOL> ax . xaxis . set_ticks_position ( '<STR_LIT>' ) <EOL> ax . yaxis . set_ticks_position ( '<STR_LIT:left>' ) <EOL> ax . grid ( True , '<STR_LIT>' , color = '<STR_LIT>' , linestyle = '<STR_LIT:->' , linewidth = <NUM_LIT> ) <EOL> if not isinstance ( ax . xaxis . get_major_locator ( ) , mpl . ticker . LogLocator ) : <EOL> ax . xaxis . set_minor_locator ( mpl . ticker . AutoMinorLocator ( <NUM_LIT:2> ) ) <EOL> if not isinstance ( ax . yaxis . get_major_locator ( ) , mpl . ticker . LogLocator ) : <EOL> ax . yaxis . set_minor_locator ( mpl . ticker . AutoMinorLocator ( <NUM_LIT:2> ) ) </s>
