Skip to content

DOC: Remove duplicated colormap normalization gallery example - #32540

Merged
timhoffm merged 2 commits into
matplotlib:mainfrom
AnuTech-01:doc-remove-colormap-norm-gallery
Oct 31, 2026
Merged

timhoffm merged 2 commits into
matplotlib:mainfrom
AnuTech-01:doc-remove-colormap-norm-gallery

Conversation

@AnuTech-01

Copy link
Copy Markdown
Contributor

PR summary

Tim pointed out in issue #14892 that the gallery example colormap_normalizations and the tutorial colormapnorms contain the same content, so I removed the gallery example. I also removed its entry from gallery_order.txt. So that old links don't break, I added 2 redirect-from directives to the tutorial. I also cleaned up the tutorial wording: .TwoSlopeNorm is built-in, and the class below does the same thing by hand.

Closes #14892

AI Disclosure

I got help from an AI assistant (Claude) to translate my comments and PR text into English and to understand commands. I read the code myself, looked at the git diff myself, and talked to Tim in the issue myself.
It also helped me find this issue, suggested the steps (removing the example, adding the redirects) and gave me the commands to make the edits.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • [N/A] New and changed code is tested
  • [N/A] Plotting related features are demonstrated in an example
  • [N/A] New features and API changes have release notes
  • Documentation complies with general and docstring guidelines

@github-actions github-actions Bot added Documentation: examples files in galleries/examples Documentation: user guide files in galleries/users_explain or doc/users labels Oct 26, 2026
# colormapping
colormap_interactive_adjustment
colormap_normalizations
colormap_normalizations_symlognorm

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.

Should this be moved as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I only removed colormap_normalizations and didn't move it anywhere, because Tim said to remove the duplicates, so I also removed its entry from gallery_order.txt. The tutorial is already included automatically in users_explain/colors/gallery_order.txt because of the *. Would you like me to list the tutorial there explicitly at a particular position, or was your question about something else?

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.

I mean the symlognorm example.

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.

Let’s not fold the symmlognorm into this PR. The example is actually better than user guide section. Just deleting the example would loose content.

One could consider moving the example content into the user guide and then deleting the example. Optionally, creating a simple nonlinear colomapping example so that norms still appear in the examples,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tim and jklymak, thank you for reviewing and merging the PR. I learned a lot from it. I found the idea of moving the symlognorm example into the tutorial and creating a small nonlinear colormapping example very interesting.
I would like to try this. Would that be okay for a newcomer, or should I start with something smaller?

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.

@AnuTech-01 you are welcome to try this.

@timhoffm
timhoffm merged commit 0a12b8d into matplotlib:main Oct 31, 2026
23 checks passed
@QuLogic QuLogic added this to the v3.12.0 milestone Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: examples files in galleries/examples Documentation: user guide files in galleries/users_explain or doc/users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doc: MidpointNormalize example should point to DivergingNorm as a built-in function

4 participants