Mysterious "ValueError: zero-size array..."

Note, that this is private discussion now and no longer on
the list
(accidentally?). If you want to put it back on the
list, please feel
free to do so.

Yeah, my email client (yahoo!) showed your example submission email as being directly to me, not the list, so I assumed that you were sending it directly to me because you saw that I had cross-posted to the numpy list. Anyway, I'm returning this thread to this list, FWIW.

d1 is a diagram_cl.Diagram instance, holding a

Sorry for being dense, but where do I get diagram_cl?

from matplotlib import diagram_cl as dc

Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name diagram_cl

and http://matplotlib.sourceforge.net/search.html?q=diagram_cl yields:

Search Results

Your search did not match any documents.

DG

···

--- On Sat, 3/6/10, Friedrich Romstedt <friedrichromstedt@...287...> wrote:

matplotlib.figure.Figure instance and an
matplotlib.axes.Axes instance
of that figure. I used it because I was too lazy to
create them on my
own.

fwiw, diagram_cl is used to plot single-axes
diagrams. There are also
accompanying Layer2D (f(x) plots) and Layer3D
(xy-colorplots) classes.
They hide the internals of matplotlib completely and
provide a pure
data-oriented interface.

Friedrich

2010/3/6 David Goldsmith <d_l_goldsmith@...9...>:

Yeah, my email client (yahoo!) showed your example submission email as being directly to me, not the list, so I assumed that you were sending it directly to me because you saw that I had cross-posted to the numpy list. Anyway, I'm returning this thread to this list, FWIW.

Yeah, my e-mail client (gmail) chooses for e-mail from the
matplotlib-users list as default recipient of the answer always the
sender (maybe a misconfiguration?). I have to click "Answer All", and
I sometimes fail to do so, and do not recognise.

d1 is a diagram_cl.Diagram instance, holding a

Sorry for being dense, but where do I get diagram_cl?

All you tried won't work, diagram_cl is not included with matplotlib,
and as I think it never will. Please clone or download from
http://github.com/friedrichromstedt/diagram_cl . See also
http://sourceforge.net/mailarchive/forum.php?thread_name=4B8443E2.9000506%40gmail.com&forum_name=matplotlib-users
. Do you need advice with installing the package? I have not provided
an setup.py so far.

Friedrich

>> d1 is a diagram_cl.Diagram instance, holding a
>
> Sorry for being dense, but where do I get diagram_cl?

All you tried won't work, diagram_cl is not included with
matplotlib,
and as I think it never will. Please clone or
download from
http://github.com/friedrichromstedt/diagram_cl . See
also
http://sourceforge.net/mailarchive/forum.php?thread_name=4B8443E2.9000506%40gmail.com&forum_name=matplotlib-users
. Do you need advice with installing the package? I
have not provided
an setup.py so far.

Ah, ok, not right now (perhaps later): for the purpose of adding your code to the numpy bug ticket, I think it's best if I use something a little more ubiquitous. :wink: But it looks useful, so I'll probably grab it and try it out myself; is it pure python, i.e., should I be able to just put it in a folder containing an init file in site-packages and then it should "just work"?

Thanks again,

DG

DG

···

--- On Sat, 3/6/10, Friedrich Romstedt <friedrichromstedt@...287...> wrote:

Friedrich

David Goldsmith:

Ah, ok, not right now (perhaps later): for the purpose of adding your code to the numpy bug ticket, I think it's best if I use something a little more ubiquitous. :wink: But it looks useful, so I'll probably grab it and try it out myself; is it pure python, i.e., should I be able to just put it in a folder containing an init file in site-packages and then it should "just work"?

Yeah, simply have a look at diagram.py

And yes, it should work out-of-the-box. The init file should be
already included. Simply put it in a folder. It's tiny.

Everything needed should be:

import matplotlib.figure

fig = matplotlib.figure.Figure()
ax = fig.add_axes((0.2, 0.2, 0.6, 0.6))
ax.imshow(...)

And would you mind if I put my opinion about the not-a-numpy-issue
character on the numpy list too? I think it's a pure matplotlib
problem, in my opinion numpy is behaving well, although they told you
to fill in a ticket?

Friedrich