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

Incorrect autoscaling of polar plot limits after scatter #7130

Closed
Assignees
mdboom
Milestone
@adeak

Description

@adeak

In matplotlib 1.5.3 (installed with pip on Ubuntu, both over python 2.7.6 and 3.4.3) there seems to be an inconsistency of automatic axes limits in polar plots when a scatter plot is used. I first saw the issuein this question on Stack Overflow, and it boils down to this short example comparingplot andscatter:

import matplotlib.pyplot as pltr = range(8)ph = [-0.2]*len(r)fig,(ax1,ax2) = plt.subplots(ncols=2,subplot_kw={'polar':True})ax1.plot(ph,r,'o')ax2.scatter(ph,r)ax1.set_title('plot')ax2.set_title('scatter')plt.show()

polar plot vs scatter with automatic limits

The left axes plots the points usingplot, and the axes limits are nicely adjusted. The right axes usesscatter, and most of the points are missing as the limits are not updated correctly to fit the data. Note that the default radial (y) top limit would be 1, so there is some rescaling going on, but it is incorrect. Settingax2.set_ylim(0,max(r)) of course reproduces the scaling of the left axes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp