一开始以为using PyPlot, 和 using Plots;pyplot() 是等价的。
但是我操作发现这里边的语法 差别比较大
using PyPlot
x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x));
PyPlot.plot(x, y, color="red", linewidth=2.0, linestyle="--")
PyPlot.title("A sinusoidally modulated sinusoid")
PyPlot.grid("true") # http://docs.juliaplots.org/latest/generated/attributes_axis/
using Plots
pyplot()
x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x));
plot(x, y, color="red", linewidth=2.0, linestyle= :auto, title="test")
像title这个属性,在PyPlot.plot 的时候 是不能用的。
可能PyPlot.plot更接近matplotlib.pyplot的语法?