8000 [Bug]: Spurious lines added with some manually add contour labels · Issue #27333 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: Spurious lines added with some manually add contour labels #27333
Closed
@kafitzgerald

Description

@kafitzgerald

Bug summary

With Matplotlib 3.8+ I'm seeing spurious lines that get added with manually labeled contours via clabel.

It seems to only happen in locations where the contours are more complex or near those areas, but I haven't been able to track down why this happens.

Code for reproduction

Example code (here working with Matplotlib <3.8): https://geocat-examples.readthedocs.io/en/latest/gallery/Contours/NCL_coneff_8.html

I'll work on stripping down this example though.

Actual outcome

when run in a script that provided a manual list of contour label locations:
Screen Shot 2023-11-15 at 3 17 14 PM

when locations were manually clicked:
Screen Shot 2023-11-15 at 3 21 19 PM

Expected outcome

similar, but without the spurious straight lines.

Additional information

What are the conditions under which this bug happens?

  • happens with both "clicked" and specified manual contour labels in certain locations
  • seems to happen only near areas with more complex contours
  • interestingly, this also happens when you specify contour label locations this way on a cartopy map and the specified points are not on the projected map. however, this is not the case here.
    Has this worked in earlier versions?
  • worked prior to 3.8
    Do you know why this bug is happening?
  • unfortunately, no. will look into it a bit more though.

Operating system

OS/X

Matplotlib Version

3.8.1

Matplotlib Backend

MacOSX

Python version

Python 3.11.6

Jupyter version

4.0.8

Installation

conda

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

      0