-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[hist] Allow to customize pads layout for THStack and TMultiGraph #20819
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
base: master
Are you sure you want to change the base?
Conversation
When using PADS drawing option, now one can add number specyfiing number of columns for new pads layout. Rows will be calculated autmatically.
|
a bit related: #20770 |
hageboeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rlalik,
that's a great initiative, thank you!
I added a few comments below, please let me know what you think.
Finally, because now we are touching it, would you agree that a short paragraph about the PADS drawing option would make sense for TMultiGraph? One could add it maybe to the TMultiGraph documentation. What do you think?
I added short documentation to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! The update of the documentation is amazing. Let's build and see what the CI says!
Update: I think we can ignore the clang-format failure. Trying to format the doxygen comments does more harm than good, I believe.
Implementation of review suggestions plus extra documentation.
When using
PADSdrawing option, now one can add number specyfiing number of columns for new pads layout. Rows will be calculated autmatically.Some examples:
When changing the last but one line to:
and backward comaptibility:
Same for graphs:
{ auto mg = new TMultiGraph(); auto gr1 = new TGraph(); gr1->SetMarkerStyle(20); auto gr2 = new TGraph(); gr2->SetMarkerStyle(21); auto gr3 = new TGraph(); gr3->SetMarkerStyle(23); auto gr4 = new TGraph(); gr4->SetMarkerStyle(24); Double_t dx = 6.28/100; Double_t x = -3.14; for (int i=0; i<=100; i++) { x = x+dx; gr1->SetPoint(i,x,2.*TMath::Sin(x)); gr2->SetPoint(i,x,TMath::Cos(x)); gr3->SetPoint(i,x,TMath::Cos(x*x)); gr4->SetPoint(i,x,TMath::Cos(x*x*x)); } mg->Add(gr4,"PL"); mg->Add(gr3,"PL"); mg->Add(gr2,"*L"); mg->Add(gr1,"PL"); mg->Draw("A pmc plc pads3"); }This does not work with
--web=on(Web Canvas) but I am not good enough in JS to fix that. ButPADSseems to not work nicely with the web interface anyway. Perhaps it could be fixed -PADSin general andPADSnfor this PR. @linev could you help with that?Checklist:
This PR fixes #