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

Draw two TF1 #12679

Closed
couet opened this issue Apr 18, 2023 · 4 comments · Fixed by #12694
Closed

Draw two TF1 #12679

couet opened this issue Apr 18, 2023 · 4 comments · Fixed by #12694
Assignees
Labels

Comments

@couet
Copy link
Member

couet commented Apr 18, 2023

When two TF1 are drawn with option SAME the 2nd one might be partially drawn in case
there is a range defined on it. See:

https://root-forum.cern.ch/t/draw-two-tf1/54510/

a better repoducer is:

{
   auto C = new TCanvas();
   auto f1 = new TF1("f1","1 + 0.5*cos(30*x)",2.5,4);
   f1->SetNpx(250);
   f1->GetXaxis()->SetRangeUser(3,3.5);
   f1->SetMarkerStyle(20);
   f1->SetMarkerColor(2);

   auto f2 = new TF1("f2","1 + 0.5*cos(30*x)",2.5,4);
   f2->SetNpx(250);
   f2->GetXaxis()->SetRangeUser(3.3,3.4);
   f2->SetLineColor(4);
   f2->SetLineWidth(4);

   f1->Draw(" p");
   f2->Draw("same  L");
   C->SetGridx();
}
@couet
Copy link
Member Author

couet commented Apr 21, 2023

Fix here: #12694

@github-actions
Copy link

Hi @couet, @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

1 similar comment
@github-actions
Copy link

Hi @couet, @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@github-actions
Copy link

Hi @couet, @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

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

Successfully merging a pull request may close this issue.

2 participants