Hi,
What is the reason for having both barh and bar, when the latter
accepts the orientation='horizontal' argument? I am asking because of
sf bug #1669506, which is about hist(orientation='horizontal') not
working because it passes a log kwarg to barh.
···
--
Jouni K. Sepp�nen
http://www.iki.fi/jks
Jouni K. Sepp�nen wrote:
Hi,
What is the reason for having both barh and bar, when the latter
accepts the orientation='horizontal' argument? I am asking because of
sf bug #1669506, which is about hist(orientation='horizontal') not
working because it passes a log kwarg to barh.
I didn't do it--but it looks like the reason is that having barh as a separate method permits a more natural order of arguments without introducing more complexity in the argument handling.
Vertical bars take left, height, width, bottom;
barh takes bottom, width, height, left.
Handling this difference with all possible combinations of *args and **kwargs would be complex; the present method, using a separate name (barh), is nice and simple.
Looks like barh just needs to take a **kwargs (which could replace most of the present listed kwargs; or add a log kwarg to the list) and pass it along to bar. You are taking care of this?
Eric
barh was originally added for compatibility with matlab and on a user
request. I think the kwarg was added to bar to support easy calling
for functions that use bar (eg hist) but may also want to configure
the orientation.
···
On 3/2/07, Eric Firing <efiring@...229...> wrote:
I didn't do it--but it looks like the reason is that having barh as a
separate method permits a more natural order of arguments without
introducing more complexity in the argument handling.