I want to write the operations and parameters that I usually use in drawing in a function. In the future, just pass x and y to draw according to the default parameters. But now the question I am facing is, how do I determine which picture `plt.plot` is drawing on? For example, I want to draw two curves on a picture.

```
   def draw(x,y):
        ...            %some operations
        plt.plot(x,y)  % draw picture operations
        ...            %some operations

   draw(x,y),
   dray(x2,y2) 

```

How to ensure that these two curves are drawn on a picture. That is, what parameters do I need to pass to make `plt.plot` focus on the picture I specify.

```
def plotLine(coordinate,figName='test',xylabel=[],ax=None):
    # assert(len(coordinate)<=2)
    if (len(coordinate)==2) :
        x=coordinate[0]
        y=coordinate[1]
        assert(len(x)==len(y))
    else:
        y=coordinate
        x =np.linspace(0,len(y)-1,len(y))

    minn=min(y)
    maxx=max(y)

    plt.switch_backend('Agg')

    if ax == None:
        fig,ax = plt.subplots()
        fig = plt.figure(num=None, figsize=(3.5, 1.5), dpi=300, facecolor='w')
        plt.subplots_adjust(right = 0.98, top = 0.98, bottom=0.35,left=0.32,wspace=0, hspace=0.2)
        ax.set_xlim([0,len(x)])
        ax.set_ylim([0,maxx+maxx/3])
        plt.xticks(fontsize=5)
        plt.yticks(fontsize=5)

    bar_width = 0.35
    opacity = 0.8
    lsmarkersize = 2.5    
    lslinewidth = 0.6

    ax.plot(x,y,'-', linewidth=1, markersize=lsmarkersize, markeredgewidth=0)
    plt.savefig(figName+".png",bbox_inches='tight',dpi=500)
    # os.system("code "+figName+".png")
    if ax!=None:
        return ax
    else:
        return plt.gca()

x=[1,2,3,4,5,6]
y=[1,2,3,4,4,5]
ax = plotLine([x,y])

x=[1,2,3,4,5,6]
y=[12,13,14,15,16,17]
plotLine([x,y],ax=ax)

```

I tried to pass ax as a parameter. But the picture drawn at the end is blank.