Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary TGAxis NDC coordinates for following zoom of primary axis #16968

Open
ferdymercury opened this issue Nov 18, 2024 · 1 comment
Open

Comments

@ferdymercury
Copy link
Contributor

ferdymercury commented Nov 18, 2024

Explain what you would like to see improved and how.

From: https://root-forum.cern.ch/t/automatic-repositioning-of-tgaxis-after-zooming/61906/11

It would be nice if there was an option to let TGaxis behave in "NDC" coordinates, as if it were a TLegend. In order to follow the zooming of the primary axes.

According to couet, the inherited function TGaxis::SetNDC() exists but does not yet behave correctly.

ROOT version

ROOT v6.32.04
Built for linuxx8664gcc on Aug 14 2024, 04:13:21
From tags/v6-32-04@v6-32-04
With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Binary directory: /opt/root/bin

Installation method

Binary Release

Operating system

Ubuntu 22.04

Additional context

An alternative / workaround is to have a TTimer modifying the axes every 0.5 seconds to reflect zoom updates. Or to connect the Modified() signal with a modify-slot.

Just for the record, I currently use this fully functional workaround with the signal-slot mechanism:

https://igit.ific.uv.es/ferhue/pulse-surfer/-/compare/db3486d6...b4800032?from_project_id=256

@couet
Copy link
Member

couet commented Nov 18, 2024

Indeed it is not as easy as it seems. It needs some developments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants