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 placement of Colorbar ticks using LogNorm #12155

Closed
Assignees
jklymak
Milestone
@rayosborn

Description

@rayosborn

Bug report

Bug summary

After upgrading to Matplotlib v3.0.0, the tick marks on the colorbar are no longer placed correctly when using a matplotlib.colors.LogNorm normalization.

Code for reproduction

The code is embedded in a class defined within the NeXpy application, but uses standard Matplotlib function calls. Here are the relevant extracted lines:

frommatplotlib.colorsimportLogNorm,Normalize,SymLogNormfrommatplotlib.tickerimportAutoLocator,LogLocator,ScalarFormatterfrommatplotlib.tickerimportLogFormatterSciNotationasLogFormatterself.norm=LogNorm(self.vaxis.lo,self.vaxis.hi)self.locator=LogLocator()self.formatter=LogFormatter()self.image=ax.pcolormesh(x,y,self.v,cmap=self.cmap,**opts)self.image.set_norm(self.norm)self.colorbar=self.figure.colorbar(self.image,ax=ax,norm=self.norm)self.colorbar.locator=self.locatorself.colorbar.formatter=self.formatterself.colorbar.update_normal(self.image)

Actual outcome

In Matplotlib v3.0.0, I get:
matplotlib_3_0_0

Expected outcome

In Matplotlib v2.2.3, I get:
matplotlib_2_2_3

Matplotlib version

  • Operating system: Mac OS 10.12.6
  • Matplotlib version: 3.0.0
  • Matplotlib backend: Qt5Agg
  • Python version: 3.6.5

I got the same result when using conda to install v3.0.0 or pip to install the latest development version.

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