本文多来源于网络,部分添加了自己的思考,如侵权请立马联系我作者删除。本人初来乍到,如有错误还望指出,敬谢!
一、折线图的绘制
plot函数
生成规则,前两个参数默认为横坐标和纵坐标,倘如只给一个参数默认给出为纵坐标,横坐标将自动填充[0,n-1].
这些线的粗细和颜色是可以控制的
plot(x, y) # plot x and y using default line style
and color
plot(x, y, 'bo') # plot x and y using blue circle markers
plot(y) # plot y using x as index array 0..N-1
plot(y, 'r+') # ditto, but with red plusses
下面是控制的具体语句,顺序为“颜色标记线形”
``'-'`` solid line style
``'--'`` dashed line style
``'-.'`` dash-dot line style
``':'`` dotted line style
``'.'`` point marker
``','``