Skip to content

Conversation

@ferdymercury
Copy link
Collaborator

@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)

@github-actions
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
Collaborator 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
Collaborator 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
Collaborator 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
Collaborator 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
Collaborator 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 TScatter2D class directly inspired from TScatter. That's good. In particular a TGraph2D is a core of the class (like a TGraph for TScatter). But The painting should be done in TGraph2DPainter and all the machinery to Paint TGraph2D is in TGraph2DPainter. I will do that.

@couet
Copy link
Member

couet commented Feb 21, 2025

I am back working on this one. I would like to change the painting model and build in TGraph2Dpainter. I am not sure what's the best way to do it. As I do not know how to contribute to this PR may be best that I make a new one?

@ferdymercury
Copy link
Collaborator Author

I am back working on this one. I would like to change the painting model and build in TGraph2Dpainter. I am not sure what's the best way to do it. As I do not know how to contribute to this PR may be best that I make a new one?

Thanks! Yes, starting a new one sounds good

@ferdymercury
Copy link
Collaborator Author

Feel free to copy-paste the doxygen comments that I wrote into yours.
Also, maybe it's worth to add also the "marker style" as a 6th dimension configurable for each point.

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