Skip to content

Question: Accessing the matplotlib objects of ErrorGlot/GridPlot #102

@kevinkraft

Description

@kevinkraft

I'm using the function "efficiencies" in rep/rep/classification.py, which returns a GridPlot which contains a list of ErrorPlot objects.

The default axis range and general layout of the plots are not what I want. I need to access the matplotlib objects so that I can redraw them using my own options and call functions like:

plt.xscale('log')
plt.xlim(0,10)

How do I get these objects back from the GridPlot and ErrorPlot plot() member functions? From the source code it seems like they are never saved as class atributes or passed back to the user.

I also tried the code below, but this doesn't do anything to the efficiency plots:

plt.figure()
plt.xscale('log')
sig_eff = report.efficiencies(uniform_features, bins=30,
labels_dict={1: 'signal'},errors=True)
sig_eff.plot()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions