문제

I am using Winston library with Julia for plotting. What is the stem plot equivalent in Winston as in MATLAB? (Note : Here winston is in the tag entries is different from Winston library of Julia.)

도움이 되었습니까?

해결책

Not sure there is something built in, but this seems to get what you want

using Winston

x = randn(10)

function stemplot(x, args...)
    n = length(x)

    p = FramedPlot()
    add(p, Points(1:n, x, kind="filled circle"))
    map(i-> add(p,  Curve([i,i], [0,x[i]])), 1:n)
    add(p, Curve([1,n], [0,0]))

    p
end
stemplot(x)

다른 팁

There is now a stem plot function in the Winston package. Here is the docs page: http://winston.readthedocs.org/en/latest/fun/stem.html

tl;dr:

stem(y[,spec::ASCIIString])
stem(x,y[,spec::ASCIIString])
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top