Vertical and horizontal lines on a chart using matplotlib in python

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • import matplotlib.pyplot as plt
    x = [1,2,3,4,5,6,7,8,9,10]
    y = [1,3,2,5,4,7,6,9,8,10]
    l = [2,4,8]
    plt.plot(x,y)
    plt.axvline(5,color='red',linestyle='dashed',linewidth=4)
    plt.axhline(3,c='b',ls=':',lw=3)
    plt.vlines(l,ymin=1,ymax=10)
    plt.hlines([5,7,8],xmin=1,xmax=10,color='g',linestyle='-.',lw=2)
    plt.ylim(1,10)
    plt.xlim(1,10)
    plt.show()
    matplotlib.org...

Комментарии • 4

  • @user-ts8gs2vl2j
    @user-ts8gs2vl2j 4 месяца назад +1

    Wow, all topic covered😮😮😮in one video

  • @adamshenk9970
    @adamshenk9970 Месяц назад

    bless fantastic thank you

  • @omarshybat6845
    @omarshybat6845 Год назад

    I have a question how to make it using turtle and making a varibale called pen=turtle and use it to make the shape of an X O game and thank you for the video

  • @nriezedichisom1676
    @nriezedichisom1676 Год назад

    Thank you