質問

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