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

plt.yscale('log') after plt.scatter() behaves unpredictably in this example. #6915

Closed
Assignees
mdboom
Milestone
@davidmikolas

Description

@davidmikolas

As mentionedin this SE question a scatter plot is not autoscaling to include all of the data ifplt.yscale('log') is used afterplt.scatter(). This happens for the y-axis but not the x-axis in the example, and does not happen forplt.plot().

In anearlier answer by a developer,ax.set_yscale('log') is shown followingax.scatter(), so I am wondering if this may be a bug.

Using matplotlib version 1.5.1 and python 2.7.11

image

import matplotlib.pyplot as pltX = [0.997, 2.643, 0.354, 0.075, 1.0, 0.03, 2.39, 0.364, 0.221, 0.437]Y = [15.487507, 2.320735, 0.085742, 0.303032, 1.0, 0.025435, 4.436435,     0.025435, 0.000503, 2.320735]plt.figure()plt.subplot(2,2,1)plt.scatter(X, Y)plt.xscale('log')plt.yscale('log')plt.title('scatter - scale last')   plt.subplot(2,2,2)plt.plot(X, Y)plt.xscale('log')plt.yscale('log')plt.title('plot - scale last')   plt.subplot(2,2,3)plt.xscale('log')plt.yscale('log')plt.scatter(X, Y)plt.title('scatter - scale first')   plt.subplot(2,2,4)plt.xscale('log')plt.yscale('log')plt.plot(X, Y)plt.title('plot - scale first')   plt.show()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp