Stem plot in matplotlib?

前端 未结 2 803
迷失自我
迷失自我 2020-12-31 05:05

I want to plot(x, sin(x)) but instead of a line from (xi,yi) to (x_i+1,y_i+1) I want a vertical line to each point from (xi,0)

2条回答
  •  难免孤独
    2020-12-31 05:27

    I think you want to use linestyle='steps--'

    plot(x, sin(x), linestyle='steps--')
    

提交回复
热议问题