plot dense and large arrays, AGG limit?

Jin-chung> One would expect the following will fill up the plot
    Jin-chung> window:
    >>>> n=zeros(20000) n[::2]=1 plot(n)

    Jin-chung> The plot "stops" a little more than half way, as if it
    Jin-chung> "runs out of ink".

    Jin-chung> It happens on Linux as well as Solaris, using either
    Jin-chung> numarray and Numeric, and both TkAgg and GTKAgg, but
    Jin-chung> not GTK. Is this due to some AGG limitation?

Hi Jin-chung,

This is indeed an agg problem. It is not a limitation in the sense of
'n is too large'. It looks like a bug in agg but it is too early to

For example, this is OK

  >>> plot(n)
  >>> ax.set_ylim((-2,2))

as is

>>> plot(n, 'o')


  >>> plot(rand(20000))

Ie, the problem seems to occur when plotting solid lines where many of
the y values are similar, but is not a problem with the length of n,
per se.

I was able to reproduce the bug in pure agg c++ and posted to the agg
mailing list. Maxim (agg author) is on vacation, but I suspect he'll
provide some insight when he returns.

Thanks for letting me know,