From: John H. <jdh...@ac...> - 2004-03-01 15:21:41
|
>>>>> "Arnold" == Arnold Moene <arn...@wu...> writes: Arnold> Dear all, Praise for this first serious python plotting Arnold> package! Thanks! Arnold> I have two minor comments: -> when I try to do an errorbar plot with a scalar, rather than an Arnold> array as the argument (i.e. errorbar(scalar_x, scalar_y, Arnold> xerr=scalar_xerr)) I get the following error message: Arnold> "/usr/lib/python2.3/site-packages/matplotlib/axes.py", Arnold> line 569, in errorbar right = x+xerr[1] IndexError: index Arnold> out of bounds Arnold> This is due to the fact that the length of xerr is tested Arnold> only to be 1 or greater than 1 (asymmetric Arnold> errors). However, the option that I would like to plot Arnold> just one point is not included. So an extra if-clause is Arnold> needed before the present code that checks whether x and Arnold> xerr are arrays or not. Well, the behavior you are seeing is the correct, documented behavior. I think it would be easier for you to pass errorbar what it is expecting than for errorbar to handle this additional use case - it's already getting pretty hairy in there. DO you have a problem doing errorbar([1],[2],xerr=[.1]) -> I very much like the option for scatter to color the blobs to -> be Arnold> plotted. However, I have an application where the shape of Arnold> the blobs is immaterial: I would rather have filled Arnold> circles (or even better: filled symbols, be it circles, Arnold> triangles ...). Anyhow: I would like them to be symmetric Arnold> irrespective of the range of the axes. One option would be Arnold> to allow the s-keyword to be allowed to be negative, where Arnold> negative means: symmetric and the value of the negative Arnold> number being the size relative to some default size. You're not the first! The temporary workaround is to use plot(x,y,'o') which uses fixes sizes in points for the symbols (you can also use '*', '+', etc) However, you cannot vary the size or color of the symbols so this may not be workable. When I refactor the scatter / pcolor etc commands as discussed in my response to Dominique Orban above, I'll make sure that this case is handled as well. I plan to support efficient handling of scatter with arbitrary (or at least several) shapes where the size can be in data (x,y) or user-defined coords, eg, physical sizes. It would be helpful for me if people gave some information about how they would like scatter to behave, particularly in regard to the sizes since I am still working this out. Would you like physical sizes, eg circles with radius in points, or what? Should the shape depend on the aspect ratio of the plotting window. Eg, if it's a circle and you have a short, wide window, should it appear ellipsoidal? What basic scatter symbols should be supported? What are the most common uses: fixed size? fixed color? vary both? JDH |