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

Scatterplot: should vmin/vmax be ignored when a norm is specified? #14603

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Bug report

Bug summary

Thescatter documentation says:

vmin andvmax are ignored if you pass anorm instance.

However, it seems that this is not the case. Is the documentation correct of the behaviour?

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlibcmap=matplotlib.cm.viridis_rnorm=matplotlib.colors.BoundaryNorm([1,3,6,8],cmap.N,clip=True)values=np.arange(10)# only specifying a normplt.scatter(values,values,c=values,norm=norm)# also specifying vmin/vmax. Should those be ignored?plt.scatter(values,values,c=values,norm=norm,vmin=6,vmax=10)

Actual outcome

# only specifying a normplt.scatter(values, values, c=values, norm=norm)

index

# also specifying vmin/vmax. Should those be ignored?plt.scatter(values, values, c=values, norm=norm, vmin=6, vmax=10)

index2

So the vmin/vmax have clearly "altered" the BoundaryNorm applied on the data.

According to the documentation, this should not happen.
Specifically for a BoundaryNorm (with specified bounds), it seems strange let the plotting change those bounds.

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: 3.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): notebook inline backend
  • Python version: 3.7
  • Installed from conda-forge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp