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

5D scatter plot #17185

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

ferdymercury
Copy link
Contributor

@ferdymercury ferdymercury commented Dec 3, 2024

This Pull request:

Changes or fixes:

Fixes #16376

Sibling PR: root-project/roottest#1236

This "kind of works" but I cannot properly zoom and rotate the TView. So I would like to ask @couet for help in that regard, what shall I do with the DistancetoPrimitive function, etc ?

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

Copy link

github-actions bot commented Dec 3, 2024

Test Results

    19 files      19 suites   4d 0h 24m 5s ⏱️
 2 726 tests  2 723 ✅ 1 💤  2 ❌
49 160 runs  49 140 ✅ 0 💤 20 ❌

For more details on these failures, see this check.

Results for commit 643f369.

@couet
Copy link
Member

couet commented Dec 4, 2024

@ferdymercury Thanks for this PR ! I will check asap.

@ferdymercury
Copy link
Contributor Author

Thanks, no hurries. This is the output I get at the moment:

image

/// \macro_image
/// \macro_code
///
/// \author Olivier Couet
Copy link
Member

Choose a reason for hiding this comment

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

I am not the author ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copy-pasted most parts of the tutorial from you ;)

@couet
Copy link
Member

couet commented Dec 4, 2024

I get this:

Processing scatter2.C...
Error in <TGraphPainter::PaintScatter>: No TView in current pad

An no graphics.
I will check

@ferdymercury
Copy link
Contributor Author

ferdymercury commented Dec 4, 2024

To solve this, I had to add scatter2->GetHistogram()->Draw();
Before scatter2->Draw

@couet
Copy link
Member

couet commented Dec 4, 2024

To solve this, I had to add scatter2->GetHistogram()->Draw(); Before scatter2->Draw

No , this is not acceptable. BTW the why do you put the Painting routine in TGraphPainter and not In TGraph2DPainter ? It is 3D plotting so much closer to TGRaph2D. When I started thinking of it that was my plans... but you came with this PR before I had time to start ...

@ferdymercury
Copy link
Contributor Author

To solve this, I had to add scatter2->GetHistogram()->Draw(); Before scatter2->Draw

No , this is not acceptable. BTW the why do you put the Painting routine in TGraphPainter and not In TGraph2DPainter ? It is 3D plotting so much closer to TGRaph2D. When I started thinking of it that was my plans... but you came with this PR before I had time to start ...

Yep, I tried with TGraph2DPainter, but I was confused, since it didn't have a TVirtualGraph2DPainter as is the case with TGraphPainter, so I did not know where to store or get the pointer of TGraph2DPainter. Also, THistPainter also does 3D stuff, so I thought it was easier to just copy the structure that is used in TScatter.

@couet
Copy link
Member

couet commented Dec 4, 2024

So what do we do? you continue with this one or you stop a bit giving me some time to investigate on my side?

@ferdymercury
Copy link
Contributor Author

So what do we do? you continue with this one or you stop a bit giving me some time to investigate on my side?

Yep, I will wait, no hurries. Thanks.

@couet
Copy link
Member

couet commented Dec 4, 2024

Ok I will check on my side in that case. You made Scatter2D class directly inspired from TScatter. That's good. In particular a TGraph2D is a core of the class (like a TGrpag for TScatter). But The painting should be done in TGraph2DPainter and all the machinery to Paint TGraph2D is in TGraph2DPainter. I will do that.

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.

[graph] 5D scatter plot
2 participants