Logarithm Plots
当数据出现指数型变化时,如果继续使用polt的线性刻度,则低次幂部分无法完全表现出来,所以需要采用semilogx、semilogy、loglog函数来解决对数数据。
1 | >> x = logspace(-1,1,100); |
plotyy()
两个y轴
1 | >> x = 0:0.01:20; |
Histogram
1 | >> y = randn(1,1000); # randn得到正太分布的随机数 |
Bins是指柱形的条数
Bar Charts
Histogram看整体的情况, Bar Charts看个别的情况
1 | >> x = [1 2 5 4 8]; |
Pie Charts
1 | a = [10 5 20 30]; |
Stairs and Stem Charts
1 | >> x = linspace(0, 4*pi, 40); |
fill()
1 | t = (1:2:15)'*pi/8; |
plot3()
1 | x = 0:0.1:3*pi; |