Miscellaneous GR questions

1 is there a “show” equivalent a la matplotlib ? i see one in the GR reference but it doesn’t appear to be mapped through to julia. I’d like for the plot to sit there until i close it.

2 what’s the right way to continue plotting to a given plot repeatedly. do i call plot each time or do i call plot the first time and oplot for lines 2…n ?

3 send: No error ? I got this error while repeatedly invoking plot even though i saw a graph and it looked correct.

4 is there a way to do “live” updates to a graph as i accumulate data ? maybe using oplot ?


A1: This is currently not supported in the Julia/Python wrappers. We will hopefully provide a better integration in a future release. It’s not a problem of the underlying GR framework.
A2: I will probably add plot!() functions similar to those in Plots.jl.
A3: Do you have a MWE?
A4: There are several live (and even real-time) demos in the example section.

1 Like

Meanwhile, should I just use “hold” and continue to call “plot” ? or would I invoke polyline for each data set ? (the live/real-time demos might tell me)

I hope to provide one tomorrow. I was at work and ran out of time, but I thought I would mention it just in case it might be a known issue.

Great. I’ll take a look.

Thank you.

Well, i went back to my example today that gave the error and now, no error. I know at the time it occurred I switched back to PyPlot and it went away, so I don’t think it was a coincidence.

I tried using


and then simply called plot repeatedly and the graphing is quite slow.

i created a small example.

function test3()
    n = 10
    y = rand(n, 100)
    for i=1:100
        if i==1
            plot(x, y[:, i])
            plot(x, y[:, i])

if you run the example and simply call plot(x,y) to plot all the data at once, instead of invoking plot repeatedly, the plot shows up immediately (i can’t do this, each of my graph lines is a different number of points).

The docs say:

The hold flag prevents drawing of axes and clearing of previous plots, so that the next plot will be drawn on top of the previous one.

so it’s not obvious to me that there should be such a delay in each invocation of plot.