Question

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.)

Was it helpful?

Solution

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)

OTHER TIPS

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])
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top