<s> from numpy import asarray <EOL> import pylab <EOL> from shapely . geometry import Point , LineString , Polygon <EOL> polygon = Polygon ( ( ( - <NUM_LIT:1.0> , - <NUM_LIT:1.0> ) , ( - <NUM_LIT:1.0> , <NUM_LIT:1.0> ) , ( <NUM_LIT:1.0> , <NUM_LIT:1.0> ) , ( <NUM_LIT:1.0> , - <NUM_LIT:1.0> ) ) ) <EOL> point_r = Point ( - <NUM_LIT> , <NUM_LIT> ) <EOL> point_g = Point ( - <NUM_LIT:1.0> , <NUM_LIT:1.0> ) <EOL> point_b = Point ( - <NUM_LIT:0.5> , <NUM_LIT:0.5> ) <EOL> line_r = LineString ( ( ( - <NUM_LIT:0.5> , <NUM_LIT:0.5> ) , ( <NUM_LIT:0.5> , <NUM_LIT:0.5> ) ) ) <EOL> line_g = LineString ( ( ( <NUM_LIT:1.0> , - <NUM_LIT:1.0> ) , ( <NUM_LIT> , <NUM_LIT:0.5> ) ) ) <EOL> line_b = LineString ( ( ( - <NUM_LIT> , - <NUM_LIT> ) , ( <NUM_LIT> , <NUM_LIT:0.5> ) ) ) <EOL> def plot_point ( g , o , l ) : <EOL> pylab . plot ( [ g . x ] , [ g . y ] , o , label = l ) <EOL> def plot_line ( g , o ) : <EOL> a = asarray ( g ) <EOL> pylab . plot ( a [ : , <NUM_LIT:0> ] , a [ : , <NUM_LIT:1> ] , o ) <EOL> def fill_polygon ( g , o ) : <EOL> a = asarray ( g . exterior ) <EOL> pylab . fill ( a [ : , <NUM_LIT:0> ] , a [ : , <NUM_LIT:1> ] , o , alpha = <NUM_LIT:0.5> ) <EOL> def fill_multipolygon ( g , o ) : <EOL> for g in g . geoms : <EOL> fill_polygon ( g , o ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> from numpy import asarray <EOL> import pylab <EOL> fig = pylab . figure ( <NUM_LIT:1> , figsize = ( <NUM_LIT:4> , <NUM_LIT:3> ) , dpi = <NUM_LIT> ) <EOL> pylab . axis ( '<STR_LIT>' ) <EOL> a = asarray ( polygon . exterior ) <EOL> pylab . fill ( a [ : , <NUM_LIT:0> ] , a [ : , <NUM_LIT:1> ] , '<STR_LIT:c>' ) <EOL> plot_point ( point_r , '<STR_LIT>' , '<STR_LIT:b>' ) <EOL> plot_point ( point_g , '<STR_LIT>' , '<STR_LIT:c>' ) <EOL> plot_point ( point_b , '<STR_LIT>' , '<STR_LIT:d>' ) <EOL> plot_line ( line_r , '<STR_LIT:r>' ) <EOL> plot_line ( line_g , '<STR_LIT:g>' ) <EOL> plot_line ( line_b , '<STR_LIT:b>' ) <EOL> pylab . show ( ) </s>
