Вопрос

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