setting y-axis ranges

Asked by Kentarou Mawatari on 2019-03-11

Dear MA5 team,

It would be great if we could set y-axis ranges in the normal user mode, especially with matplotlib.
I just realized that setting y-axis ranges were quite different between ROOT and matplotlib, and plots by ROOT look better...

Best regards,
Kentarou

Question information

Language:
English Edit question
Status:
Solved
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Solved by:
Benjamin Fuks
Solved:
2019-03-19
Last query:
2019-03-19
Last reply:
2019-03-19
Benjamin Fuks (fuks) said : #1

Hi Kentarou,

I have finally found the time to start looking into this one. Please find in attachment MadAnalysis5 v1.8.1 that contains the ymin and ymax option for any histogram. Please let me know if you get any suspicious behavior.

Cheers,

Benj

PS: I will work on the ma5-mg5 interface asap.

> On 11 Mar 2019, at 05:17 , Kentarou Mawatari <email address hidden> wrote:
>
> New question #679112 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/679112
>
> Dear MA5 team,
>
> It would be great if we could set y-axis ranges in the normal user mode, especially with matplotlib.
> I just realized that setting y-axis ranges were quite different between ROOT and matplotlib, and plots by ROOT look better...
>
> Best regards,
> Kentarou
>
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

thanks! How can we set ymin/ymax in a command, .e.g

plot PT(e-) 100 0 1000 [logY]

?

Kentarou

Best Benjamin Fuks (fuks) said : #3

Hi Kentarou,

You can type:
  set selection[x].ymin = …
where x stands for the id of the plot. It is an integer with 1 being the first plot, 2 the second plot, and so on (beware, cut counts too). You can also use tab completion to check what is available and type "display selection[x]" to verify things have been entered correctly.

Cheers,

Benj

> On 18 Mar 2019, at 20:32 , Kentarou Mawatari <email address hidden> wrote:
>
> Question #679112 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/679112
>
> Status: Answered => Open
>
> Kentarou Mawatari is still having a problem:
> thanks! How can we set ymin/ymax in a command, .e.g
>
> plot PT(e-) 100 0 1000 [logY]
>
> ?
>
> Kentarou
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Thanks Benjamin Fuks, that solved my question.