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

AutoMinorLocator picking up logscale in alternate axis #20114

Open
@DannyVanpoucke

Description

@DannyVanpoucke

Bug report

Warning thrown:
"
...\anaconda3\lib\site-packages\ipykernel_launcher.py:157: UserWarning: AutoMinorLocator does not work with logarithmic scale
...\anaconda3\lib\site-packages\IPython\core\pylabtools.py:128: UserWarning: AutoMinorLocator does not work with logarithmic scale
fig.canvas.print_figure(bytes_io, **kw)
"

Bug summary
This warning is thrown on an old(6months) python code transferred to a new computer. Warning was not present in old setup (unfortunately machine is no longer accessible for comparison of settings and environment.)

Code for reproduction

importmatplotlibasmpl,matplotlib.pyplotaspltfrommatplotlib.tickerimportMultipleLocator,LogLocator,NullLocator,AutoMinorLocator,NullFormatterimportnumpyasnpdefPlotHyperTune2(X,Y,histogram):plt.style.use('./GraphStyle.mplstyle')fig=plt.figure(figsize= (12,8))ax=fig.add_subplot()locminX=LogLocator(base=10.0,subs=np.arange(2,10)*.1,numticks=100)plt.xscale("log")ax.xaxis.set_minor_locator(locminX)axH=ax.twinx()# Histogram uses the same x-axisplt.show()x2=np.arange(100)x2=x2+2y2=np.zeros(400).reshape((4,100))y2[0]=x2hist2=np.sin(x2*0.02)PlotHyperTune2(x2,y2,hist2)

Actual outcome

warning message at the top & no log-sub-ticks on the x-axis

Expected outcome

No warnings. and log-sub-ticks on the x-axis

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.1.0 (also version 3.3.4)
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
  • Jupyter version (if applicable): 6.0.0 (notebook) 4.5.0 (core)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp