Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

polar plot incorrectly handles units of degrees/radians #6144

Open
@jmdearman

Description

@jmdearman

Setup

matplotlib.__version__= 1.5.1 (installed as part of anaconda distribution)
Python 3.4.4
OS X

Issue

Code fromexamples/units/radian_demo.py with minor modifications:

import numpy as npfrom basic_units import radians, degrees, cosfrom matplotlib.pyplot import figure, showx = [val*radians for val in np.arange(0, 15, 0.01)]fig = figure()ax = fig.add_subplot(121, projection='polar')line1, = ax.plot(x, np.array(cos(x))+1, xunits=radians)ax = fig.add_subplot(122, projection='polar')line2, = ax.plot(x, np.array(cos(x))+1, xunits=degrees)show()

figure_1

Notes

Note that the plot on the left is correct, but the angular tick labels aren't incrementing correctly. I can't tell if this is an issue with the basic_units.py example implementation or the units interface.

If it seems like a straightforward fix, I'd be happy to take a look at it: the units interface is really slick and it would be great to get this working with polar coordinates too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp