Skip to content

Polar plot error bars don't rotate with angle #441

@drwebb

Description

@drwebb

In this example the errorbars do not align with the theta of bar. I posted this as a question at stackoverflow, and maybe the answer could be useful. Surely, this should not be default behavior though.

Example non-working code:

from numpy import *
from matplotlib import pyplot as py


r=zeros([16])
err=zeros([16]) 
for i in range(16):
    r[i]=random.randint(400,600)
    err[i]=random.randint(20,50)
theta=arange(0,2*pi,2*pi/16)
width = pi*2/16

fig = py.figure(figsize=(8,8))
ax = fig.add_axes([0.1, 0.1, 0.75, 0.79], polar=True)

bars = ax.bar(theta+pi/16, r, width=width, bottom=0.0,yerr=err)
ax.set_ylim(0,700)
py.show()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy