How to draw a diagonal line in subplot?
<p>I try to draw a diagonal line but it doesn't work.</p>

<p>I can draw a horizontal and vertical line by use axhline and axvline</p>

<p>but I dont know about diagonal I have use plot but it doesn't work</p>

<p>Here is some of my code and result : </p>

<pre><code>while (loop &lt; candleLength) :
        date = stockData['date'][loop]
        date = dateToFloat(date)
        append = date, stockData['open'][loop], stockData['high'][loop], stockData['low'][loop], stockData['close'][loop]
        ohlc.append(append)
        loop += 1

    fig = plt.figure()
    ax = plt.subplot2grid((1,1), (0,0))

    candlestick_ohlc(ax, ohlc, width=0.66, colorup='#4dff4d', colordown='#ff471a')    # plt.plot([736062.0, 736118.0], [70, 70], 'k-', lable = 'example line')


    for label in ax.xaxis.get_ticklabels():
        label.set_rotation(45)

    ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    ax.xaxis.set_major_locator(mondays)
    ax.grid(True)


    ax.text(buyPointTypeFloat, buyPrice, 'BUY', fontdict=font_dict)
    ax.text(sellPointTypeFloat, sellPrice, 'SELL', fontdict=font_dict)
    # ax.plot(x=buyPrice, y=sellPrice)
    ax.axhline(y=sellPrice,color='k',ls='dashed')
    ax.axhline(y=buyPrice,color='k',ls='dashed')
    plt.xlabel('Date')
    plt.ylabel('Price')
    plt.title(stockName)
    plt.subplots_adjust(left=0.09, bottom=0.20, right=0.94, top=0.90, wspace=0.2, hspace=0)
    plt.show()
</code></pre>

<p><a href="http://i.stack.imgur.com/ICrf2.png" rel="nofollow">result pic</a></p>

<p>From pic you will see that i have 2 horizontal line at buy/sell price </p>

<p>but i want to use diogonal line instead.</p>

<p>Thank you.</p>