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

Scatter autoscaling still has issues with log scaling and zero values #16552

Closed
Milestone
@moloney

Description

@moloney

I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling andscatter. However, if you have points with 0 for the y-axis and enable log scaling there is still an issue with the scatter plot auto scaling (that doesn't show up with the standardplot function).

importitertoolsimportnumpyasnpfrommatplotlibimportpyplotaspltx_vals= [4.38462e-06,5.54929e-06,7.02332e-06,8.88889e-06,1.125e-05,1.42383e-05,1.80203e-05,2.2807e-05,2.88651e-05,3.65324e-05,4.62363e-05,5.85178e-05,7.40616e-05,9.37342e-05,0.000118632,          ]y_vals= [0.0,0.10000000000000002,0.182,0.332,0.604,1.1,2.0,3.64,6.64,12.100000000000001,22.0,39.60000000000001,71.3,          ]pts=np.array(list(itertools.product(x_vals,y_vals)))fig=plt.figure("Scatter plot")ax=fig.gca()ax.set_xscale('log')ax.set_yscale('log')ax.scatter(pts[:,0],pts[:,1])# This only shows four rows of pointsfig=plt.figure("Regular plot")ax=fig.gca()ax.set_xscale('log')ax.set_yscale('log')ax.plot(pts[:,0],pts[:,1],marker="o",ls="")# This worksplt.show()

Originally posted by@moloney in#6015 (comment)

Metadata

Metadata

Assignees

No one assigned

    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