Derek Hohls wrote:
> Hi
>
> I appreciate that this is a totally voluntary support list, but
> I was wondering what the protocol was when queries that
> I have posted go unanswered...
>
> Should I -
> (a) repost them "as is"?
> (b) rewrite them slightly and post them again
Probably the best approach.
> (c) assume no one has any interest in answering them (and give up)
> (d) something else??
>
> The queries I am referring to are:
> http://sourceforge.net/mailarchive/message.php?msg_id=38032560
> and
> http://sourceforge.net/mailarchive/message.php?msg_id=38021694
>
> (The latter especially, I am sure is within matplotlib current
> capabilities... and a hint or two will set me on the right track!)
>
> Thanks
> Derek
I had a quick look and for the first part of the second question:
> (a) what is the syntax for the fill() command - I have tried
> ax.fill(0.5,0.5,'b') and get an error:
> TypeError: zip argument #1 must support iteration
The TypeError is saying that the argument expected should be a Python
type supporting iteration, such as a numpy array, a list or a tuple.
i.e. this produces a rectangle:
ax.fill([1,1,2,2],[3,4,4,3],'b')
where the two lists contain the x- and y-coordinate polygon vertices,
respectively, ordered clockwise from the lower left.
It would take me a bit of mucking around to work out what the bar
coordinates are - hopefully an expert will pipe in with the answer. You
probably need to work out how to apply the get_verts method to the patch
collection. I find using ipython interactively is the best way to learn
to do this.
Gary R.
|