Skip to content

Added clim support to tripcolor - #22734

Merged
jklymak merged 1 commit into
matplotlib:mainfrom
andrew-fennell:tripcolor-clim-support
Mar 31, 2022
Merged

jklymak merged 1 commit into
matplotlib:mainfrom
andrew-fennell:tripcolor-clim-support

Conversation

@andrew-fennell

@andrew-fennell andrew-fennell commented Mar 30, 2022 •

Copy link
Copy Markdown
Contributor

PR Summary

tripcolor was ignoring clim input.

Added parameters to collection instantiations in tripcolor to ensure that all parameters are being handled properly (including kwargs).

Closes #22726

Example code:

from pylab import *

x, y, z = np.random.rand(100), np.random.rand(100), np.random.rand(100)

tripcolor(x, y, z, clim=(0.25, 0.75))
colorbar()
show()

Incorrect output

image

Correct output

image

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

@andrew-fennell

Copy link
Copy Markdown
Contributor Author

I don't think randomness is encouraged in testing, but I am not very familiar with how to test some components.

If anyone has any advice or suggestions, I would appreciate it!

@andrew-fennell
andrew-fennell force-pushed the tripcolor-clim-support branch from 623e654 to 51fff64 Compare March 30, 2022 21:03
Comment thread lib/matplotlib/tri/tripcolor.py Resolved
@andrew-fennell
andrew-fennell force-pushed the tripcolor-clim-support branch 3 times, most recently from d6d0910 to 2e1033a Compare March 30, 2022 21:38

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo one minor indentation issue.

Comment thread lib/matplotlib/tri/tripcolor.py Resolved
@andrew-fennell
andrew-fennell force-pushed the tripcolor-clim-support branch from 2e1033a to 18ad350 Compare March 30, 2022 22:02
@jklymak

jklymak commented Mar 31, 2022

Copy link
Copy Markdown
Member

I don't think randomness is encouraged in testing,

You've added a seed, so it is no longer "random"!

@jklymak jklymak added this to the v3.6.0 milestone Mar 31, 2022
@jklymak
jklymak merged commit ee5d9c4 into matplotlib:main Mar 31, 2022
@jklymak

jklymak commented Mar 31, 2022

Copy link
Copy Markdown
Member

Thanks @andrew-fennell !

davidgegiya added a commit to davidgegiya/agent-orchestrator that referenced this pull request Nov 8, 2026
Pin a395083238625500dd3fa879e4976617d5353342 and its regression selectors for reproducible runs.

Source: matplotlib/matplotlib#22734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: tripcolor ignores clim

3 participants