本文主要是介绍机器学习之Octave:plot函数绘图,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
基础
plot(X,y);
X:数据矩阵,每一列为一个特征
y:数据结果向量
形状参数
- linestyle
‘-’ solid lines (default).
‘–’ dashed lines.
‘:’ dotted lines.
‘-.’ dash-dotted lines. - markerstyle
‘+’ crosshair
‘o’ circle
‘*’ star
‘.’ point
‘x’ cross
‘s’ square
‘d’ diamond
‘^’ upward-facing triangle
‘v’ downward-facing triangle
‘>’ right-facing triangle
‘<’ left-facing triangle
‘p’ pentagram
‘h’ hexagram - color
‘k’ blacK
‘r’ Red
‘g’ Green
‘b’ Blue
‘m’ Magenta
‘c’ Cyan
‘w’ White - LineWidth:number
- MarkerSize :number
- MarkerEdgeColor:number
- MarkerFaceColor:number
e.g. :
plot(angles, y, 'ro', 'LineWidth', 2, MarkerSize, 7);
其它
- 标题
title('...');
- 横轴、纵轴
xlabel('...');
ylabel('...');
- 图例
legend('...'[, '...'])
这篇关于机器学习之Octave:plot函数绘图的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!