Matplotlib error when using MadAnalysis-5 with Python-3

Bug #1923877 reported by Ankit Beniwal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadAnalysis 5
Fix Committed
Medium
Jack Y. Araz

Bug Description

Hi,

I've recently started using MG5_aMC@NLO v3.1.0 for a project. I've installed MadAnalysis-5 using Python 3.7.5 through "install MadAnalysis5" command. This installs the code as expected.

However, when I generate events for a process and try to use MadAnalysis-5 to plot the histograms, they are never plotted, i.e. output PDF contain no plots. I've pin-pointed the source of error to Matplotlib; I'm using Matplotlib v3.3.3.

The error seems to be related to Polygon which is missing some properties. You can see it in the attached matplotlib.log file below.

Let me know if this is something that'll be fixed soon. For the moment, I'm able to generate plots with MadAnalysis-5 using Python v2.7.16.

Cheers.

Revision history for this message
Ankit Beniwal (multiankit93) wrote :
Revision history for this message
Benjamin Fuks (fuks) wrote : Re: [Bug 1923877] [NEW] Matplotlib error when using MadAnalysis-5 with Python-3

Hi Ankit,

The fix will be merged later this week with the code (I am just too busy to do it right now). Please have a look to
  https://code.launchpad.net/~ma5dev/madanalysis5/v1.9_py3/+merge/400320 <https://code.launchpad.net/~ma5dev/madanalysis5/v1.9_py3/+merge/400320>
so that you can fix this issue locally, in the meantime.

Cheers,

Benjamin

> On 14 Apr 2021, at 19:05, Ankit Beniwal <email address hidden> wrote:
>
> Public bug reported:
>
> Hi,
>
> I've recently started using MG5_aMC@NLO v3.1.0 for a project. I've
> installed MadAnalysis-5 using Python 3.7.5 through "install
> MadAnalysis5" command. This installs the code as expected.
>
> However, when I generate events for a process and try to use
> MadAnalysis-5 to plot the histograms, they are never plotted, i.e.
> output PDF contain no plots. I've pin-pointed the source of error to
> Matplotlib; I'm using Matplotlib v3.3.3.
>
> The error seems to be related to Polygon which is missing some
> properties. You can see it in the attached matplotlib.log file below.
>
> Let me know if this is something that'll be fixed soon. For the moment,
> I'm able to generate plots with MadAnalysis-5 using Python v2.7.16.
>
> Cheers.
>
> ** Affects: madanalysis5
> Importance: Undecided
> Status: New
>
> ** Attachment added: "matplotlib.log"
> https://bugs.launchpad.net/bugs/1923877/+attachment/5487879/+files/matplotlib.log
>
> --
> You received this bug notification because you are a member of
> MadAnalysisTeam, which is subscribed to MadAnalysis 5.
> https://bugs.launchpad.net/bugs/1923877
>
> Title:
> Matplotlib error when using MadAnalysis-5 with Python-3
>
> Status in MadAnalysis 5:
> New
>
> Bug description:
> Hi,
>
> I've recently started using MG5_aMC@NLO v3.1.0 for a project. I've
> installed MadAnalysis-5 using Python 3.7.5 through "install
> MadAnalysis5" command. This installs the code as expected.
>
> However, when I generate events for a process and try to use
> MadAnalysis-5 to plot the histograms, they are never plotted, i.e.
> output PDF contain no plots. I've pin-pointed the source of error to
> Matplotlib; I'm using Matplotlib v3.3.3.
>
> The error seems to be related to Polygon which is missing some
> properties. You can see it in the attached matplotlib.log file below.
>
> Let me know if this is something that'll be fixed soon. For the
> moment, I'm able to generate plots with MadAnalysis-5 using Python
> v2.7.16.
>
> Cheers.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/madanalysis5/+bug/1923877/+subscriptions

Changed in madanalysis5:
status: New → Fix Committed
status: Fix Committed → In Progress
importance: Undecided → Medium
assignee: nobody → Benjamin Fuks (fuks)
assignee: Benjamin Fuks (fuks) → Jack Y. Araz (jackaraz)
milestone: none → v1.9
Revision history for this message
Ankit Beniwal (multiankit93) wrote :

Hi Benjamin,

Thanks for your reply.

I can confirm that after making the necessary changes in merging_plots.py and plotflow.py files, the Matplotlib error disappears, i.e., I can see the generated plots.

Thanks,

Ankit

Jack Y. Araz (jackaraz)
Changed in madanalysis5:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.