matplotlib / matplotlib/matplotlib

Suggested simple enhancement for coloring the surface in mpl_toolkits/mplot3d/axes3d.py

Open
#15,426 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API: changes keep topic: mplot3d
Dominant language
Python
Stars
23.2k
Forks
8.5k
Avg merge
1d 6h
Merged PRs (30d)
66

Description

This line:

> avg_z = np.array([ps[:, 2].mean() for ps in polys])

means that coloring the surface is only possibly with the z coordinate.

It would be very useful to allow an arbitrary function of ps here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in mpl_toolkits/mplot3d/axes3d.py at the line computing avg_z from polys. Trace how that value controls surface coloring and determine where an arbitrary function of ps would fit. Done means surface colors can be based on a user-selected function rather than only the z coordinate, with the existing behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.