FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

pcolormesh in log polar coordinates · Issue #12803 · matplotlib/matplotlib · GitHub

Repository navigation

pcolormesh in log polar coordinates #12803

Closed

Description

Bug report

Bug summary

radius range setting does not work for pcolormesh() in log polar coodinates.

Code for reproduction

%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt

r = np.geomspace(1, 100, num=10)
th = np.linspace(0, 360, num=50)
th = np.radians(th)
v = np.random.rand(len(r), len(th))

ax = plt.subplot(1, 1, 1, projection='polar')
ax.set_rlim(1, 100)
ax.set_rscale('log')
plt.pcolormesh(th, r, v)

Actual outcome

Expected outcome

I think the pixels should spread to the outer edge of the circle, and no warnings should be shown.

Matplotlib version

  • Operating system: Windows 8.1
  • Matplotlib version: 2.2.3
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.6.6
  • Jupyter version (if applicable): Jupyterlab 0.34.1
  • Other libraries:

Python, jupyterlab numpy and matplotlib were installed with conda.

Activity

  1. timhoffm commented on Nov 18, 2018

    Member

    There's more going wrong: The radial tick labels are missing:

    %matplotlib inline
    
    import numpy as np
    import matplotlib.pyplot as plt
    
    r = np.geomspace(1, 100, num=10)
    th = np.linspace(0, 360, num=50)
    th = np.radians(th)
    v = np.random.rand(len(r), len(th))
    
    fig, (ax1, ax2) = plt.subplots(1, 2, subplot_kw={'projection' :'polar'}, figsize=(10, 5))
    ax1.set_rlim(1, 100)
    ax1.pcolormesh(th, r, v)
    
    ax2.set_rlim(1, 100)
    ax2.set_rscale('log')
    ax2.pcolormesh(th, r, v)
    

  2. timhoffm commented on Nov 20, 2018

    Member

    Here's a diff of transData of the two versions.

    I suspect that the issue is the x1=5.0 instead of x1=10.0 in the very last Bbox. Can somebody with more transform experience please check this.

  3. dstansby commented on Dec 20, 2022

    Member

    I suspect this is the same bug as #24383 - I think it will be easier to fix #24383 first (there's an even simpler example of radial log scale that doesn't work there), then come back to this issue and see if it's fixed as a side effect.

  4. added this to the v3.7.0 milestone on Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL