edge joinstyle on rectangles

It would be nice to have. Since the patch edge seemed to be using a "round" style and I wanted "miter", my workaround was just to use a separate step plot to overlay the outline. But for more general cases (e.g., a bar plot not created from a histogram or if I wanted a "bevel" style), I'm not sure how I would do it.

Thanks,
Jeff

···

On Sep 6, 2011, at 10:48 AM, Michael Droettboom wrote:

On 08/31/2011 01:20 PM, Eric Firing wrote:

On 08/31/2011 06:45 AM, Jeffrey Blackburne wrote:

Hi,

Are the edges of the rectangles returned by plt.bar() supposed to conform
to the 'lines.solid_joinstyle' rcParam? If not, is there another method for
specifying that joinstyle?

I have not been able to change the joinstyle using this method in versions 1.0.0
(linux, gtkagg and tkagg) or 1.0.1 (os x, tkagg). I can send a minimal example
script if requested.

The bar rectangles are Patch object outlines, not Line2D objects, and
solid_joinstyle is not presently supported by patches, as far as I can see.

I suppose it probably should be supported, though. Do you agree?

I also agree that this needs to be supported.
Meanwhile, a workaround is to use the patheffects module.

For example,

from matplotlib.patheffects import Stroke

b = bar([0, 1, 2], [1, 0.5, 2], linewidth=10, fc="none")
for p in b:
    p.set_path_effects([Stroke(joinstyle="miter")])

-JJ

···

On Wed, Sep 7, 2011 at 12:47 AM, Jeffrey Blackburne <jblackburne@...3027...> wrote:

It would be nice to have. Since the patch edge seemed to be using a "round" style and I wanted "miter", my workaround was just to use a separate step plot to overlay the outline. But for more general cases (e.g., a bar plot not created from a histogram or if I wanted a "bevel" style), I'm not sure how I would do it.

Thanks,
Jeff