'Get axes data and create the axes and grids'

def open_axes(self, ax, props):

    self.ax = ax
    self.plot.title.text = ax.get_title()
    if props.get('xscale', False):
        props['axes'][0]['scale'] = props['xscale']
    if props.get('yscale', False):
        props['axes'][1]['scale'] = props['yscale']
    for props in props['axes']:
        if (props['position'] == 'bottom'):
            (location, dim, thing) = ('below', 0, ax.xaxis)
        elif (props['position'] == 'top'):
            (location, dim, thing) = ('above', 0, ax.xaxis)
        else:
            (location, dim, thing) = (props['position'], 1, ax.yaxis)
        baxis = self.make_axis(thing, location, props)
        if (dim == 0):
            gridlines = ax.get_xgridlines()
        else:
            gridlines = ax.get_ygridlines()
        if gridlines:
            self.make_grid(baxis, dim, gridlines[0])
