Revision: 3641
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3641&view=rev
Author:   efiring
Date:     2007-07-30 16:05:06 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
bar plotting patch by Michael Forbes

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/axes.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py     2007-07-30 21:41:09 UTC (rev 
3640)
+++ trunk/matplotlib/lib/matplotlib/axes.py     2007-07-30 23:05:06 UTC (rev 
3641)
@@ -3557,7 +3557,21 @@
         barcols = []
         caplines = []
 
+        lines_kw = {'label':'_nolegend_'}
+        if 'linewidth' in kwargs:
+            lines_kw['linewidth']=kwargs['linewidth']
+        if 'lw' in kwargs:
+            lines_kw['lw']=kwargs['lw']
 
+        if capsize > 0:
+            plot_kw = {
+                'ms':2*capsize,
+                'label':'_nolegend_'}
+            if 'markeredgewidth' in kwargs:
+                plot_kw['markeredgewidth']=kwargs['markeredgewidth']
+            if 'mew' in kwargs:
+                plot_kw['mew']=kwargs['mew']
+
         if xerr is not None:
             if len(xerr.shape) == 1:
                 left  = x-xerr
@@ -3566,12 +3580,10 @@
                 left  = x-xerr[0]
                 right = x+xerr[1]
 
-            barcols.append( self.hlines(y, left, right, label='_nolegend_' ))
+            barcols.append( self.hlines(y, left, right, **lines_kw ) )
             if capsize > 0:
-                caplines.extend(
-                    self.plot(left, y, 'k|', ms=2*capsize, label='_nolegend_') 
)
-                caplines.extend(
-                    self.plot(right, y, 'k|', ms=2*capsize, 
label='_nolegend_') )
+                caplines.extend( self.plot(left, y, 'k|', **plot_kw) )
+                caplines.extend( self.plot(right, y, 'k|', **plot_kw) )
 
         if yerr is not None:
             if len(yerr.shape) == 1:
@@ -3581,21 +3593,8 @@
                 lower = y-yerr[0]
                 upper = y+yerr[1]
 
-            vlines_kw = {'label':'_nolegend_'}
-            if 'linewidth' in kwargs:
-                vlines_kw['linewidth']=kwargs['linewidth']
-            if 'lw' in kwargs:
-                vlines_kw['lw']=kwargs['lw']
-            barcols.append( self.vlines(x, lower, upper, **vlines_kw) )
-
+            barcols.append( self.vlines(x, lower, upper, **lines_kw) )
             if capsize > 0:
-                plot_kw = {
-                    'ms':2*capsize,
-                    'label':'_nolegend_'}
-                if 'markeredgewidth' in kwargs:
-                    plot_kw['markeredgewidth']=kwargs['markeredgewidth']
-                if 'mew' in kwargs:
-                    plot_kw['mew']=kwargs['mew']
                 caplines.extend( self.plot(x, lower, 'k_', **plot_kw) )
                 caplines.extend( self.plot(x, upper, 'k_', **plot_kw) )
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to