Skip to content

Conversation

@jokasimr
Copy link
Contributor

Fixes #451

@jokasimr jokasimr marked this pull request as draft January 29, 2026 13:53
@jokasimr jokasimr marked this pull request as ready for review January 29, 2026 13:59
@nvaytet
Copy link
Member

nvaytet commented Jan 29, 2026

Not sure why, but I tried the code in the issue, and I have the correct label y [m] along the vertical axis.
So it seems this was fixed already?

import scipp as sc
import plopp as pp

a = pp.data.scatter()
b = pp.data.scatter(seed=2) * 10.0
b.coords['x'] += sc.scalar(50.0, unit='m')

pp.scatter({'a': a, 'b': b})
Screenshot_20260129_165809

Can you double-check?

@nvaytet
Copy link
Member

nvaytet commented Jan 29, 2026

Also works correctly for pp.scatter({'a': a}) and pp.scatter(a).

@nvaytet
Copy link
Member

nvaytet commented Jan 29, 2026

My guess is that it was fixed in https://github.com/scipp/plopp/pull/490/files#diff-27d11e8f8609ce7cd65b7314517bd96d9f9576419e191f04b9fee648be5fd3c6

(it works in version 25.10.0, although the colors are messed up, which was then fixed in #506)

@jokasimr
Copy link
Contributor Author

Aha I see. Should've checked before "fixing" it 🙄

Copy link
Member

@nvaytet nvaytet left a comment

Choose a reason for hiding this comment

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

I suggest we remove the changes but keep the tests 😉

@nvaytet nvaytet reopened this Jan 29, 2026
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
b.coords['x'] += sc.scalar(50.0, unit='m')

fig = pp.scatter({'a': a, 'b': b})
assert fig.canvas.ylabel == '[K]'
Copy link
Member

Choose a reason for hiding this comment

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

Why is the label [K]? Shouldn't it be y [m]?
I think K is the units of the data, not the xy coords?

@nvaytet
Copy link
Member

nvaytet commented Jan 30, 2026

I don't know why the CI is not running... 🤔

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.

Wrong label of axis of plopp.scatter of multiple DataArrays

3 participants