scipp / scipp/plopp

Image plot: coordinates/positions do not update

Open
#485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Doing

import plopp as pp

%matplotlib widget

n = pp.Node(pp.data.data2d())
f = pp.plot(n)
f

and then

new = pp.data.data2d() * 2.0
new.coords['x'] *= 0.5
n.func = lambda: new
n.notify_children("")

updates the colors but not the positions of the points.

Note that for pcolormesh, if the number of points have changed, we probably need to remove the mesh and create a bew one, as in #484

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 with the update path exercised by pp.Node and pp.plot, then inspect the pcolormesh handling referenced in issue #484. Run the provided Python reproducer and verify that changing new.coords['x'] updates point positions; when the point count changes, confirm the mesh is recreated rather than reused.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.