<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from bokeh . charts . builder import create_and_build , XYBuilder <EOL> from bokeh . charts . glyphs import PointGlyph <EOL> from bokeh . charts . attributes import MarkerAttr , ColorAttr <EOL> def Scatter ( data = None , x = None , y = None , ** kws ) : <EOL> """<STR_LIT>""" <EOL> kws [ '<STR_LIT:x>' ] = x <EOL> kws [ '<STR_LIT:y>' ] = y <EOL> return create_and_build ( ScatterBuilder , data , ** kws ) <EOL> class ScatterBuilder ( XYBuilder ) : <EOL> """<STR_LIT>""" <EOL> default_attributes = { '<STR_LIT>' : ColorAttr ( ) , <EOL> '<STR_LIT>' : MarkerAttr ( ) } <EOL> def yield_renderers ( self ) : <EOL> """<STR_LIT>""" <EOL> for group in self . _data . groupby ( ** self . attributes ) : <EOL> glyph = PointGlyph ( label = group . label , <EOL> x = group . get_values ( self . x . selection ) , <EOL> y = group . get_values ( self . y . selection ) , <EOL> line_color = group [ '<STR_LIT>' ] , <EOL> fill_color = group [ '<STR_LIT>' ] , <EOL> marker = group [ '<STR_LIT>' ] ) <EOL> self . add_glyph ( group , glyph ) <EOL> for renderer in glyph . renderers : <EOL> yield renderer </s>
