![]() |
![]() |
Classes | |
class | Options |
Classes #############################################################. More... | |
Functions | |
def | add_from_config_files (options, configs) |
def | allsame (targets) |
def | cartesian_product (args, kwds) |
def | cli_rootplot () |
def | cli_rootplotmpl () |
remove leading blank lines from the templates More... | |
def | config_string () |
def | diffpart (targets) |
def | display_bin_text (x, y, nbins, text) |
def | display_overflow (stack, hist) |
def | display_page_number (options) |
def | display_underflow (stack, hist) |
def | divide_axes (fig, axes, ratio_fraction) |
def | divide_canvas (canvas, ratio_fraction) |
def | fill_options (args, kwargs, scope) |
def | get_labels (hist, options) |
def | get_plot_inputs (files, options) |
def | get_plotpath (filenames, targets) |
def | initialize_hists (args, kwargs) |
def | load_matplotlib (ext) |
def | make_calls (api_call, save_call) |
def | make_html_index (path, dirs, files, filetype, template, ncolumns, width, height) |
def | make_ratio_hists (hists, options, ratio_index) |
def | merge_pdf (options) |
def | option_diff (default, modified) |
def | parse_arguments (argv, scope='global') |
def | parse_color (color, tcolor=False) |
def | parse_legend_root (options) |
def | parse_range (xedges, expression) |
def | parse_size (size_option) |
def | plot (args, kwargs) |
def | plot_hists_mpl (hists, options) |
def | plot_hists_root (hists, options) |
def | plot_ratio_mpl (axes, hists, options) |
def | plot_ratio_root (hists, xlabel, options) |
def | plotmpl (args, kwargs) |
The Application Programming Interface ###############################. More... | |
def | prep_first_draw (hist, histmax, options) |
def | process_options (options) |
def | report_progress (counter, nplots, output, ext, divisor=1) |
def | rootplot (args, kwargs) |
def | rootplotmpl (args, kwargs) |
def | samebase (targets) |
def | walk_rootfile (path, rootfile, options) |
def | write_config () |
def | write_to_file (script, destination) |
Implementation ######################################################. More... | |
Variables | |
__license__ | |
allplots_multi_template | |
allplots_template | |
argstring | |
batch | |
Use ROOT's batch mode, unless outputting to C macros, since there is a bug in pyROOT that fails to export colors in batch mode. More... | |
global_opts | |
multi_call_template | |
prog | |
ROOT | |
usage | |
use_mpl | |
use_multiprocessing | |
An API and a CLI for quickly building complex figures.
def python.rootplot.core.add_from_config_files | ( | options, | |
configs | |||
) |
Definition at line 821 of file core.py.
References python.rootplot.core.config_string(), dir, and edm.print().
def python.rootplot.core.allsame | ( | targets | ) |
def python.rootplot.core.cartesian_product | ( | args, | |
kwds | |||
) |
Definition at line 1806 of file core.py.
References genParticles_cff.map.
Referenced by python.rootplot.core.initialize_hists().
def python.rootplot.core.cli_rootplot | ( | ) |
An application for plotting histograms from a ROOT file. It is invoked from the command-line as ``rootplot``.
Definition at line 540 of file core.py.
References python.rootplot.core.parse_arguments(), edm.print(), and python.rootplot.core.rootplot().
Referenced by python.rootplot.core.cli_rootplotmpl().
def python.rootplot.core.cli_rootplotmpl | ( | ) |
remove leading blank lines from the templates
The Command-Line Interface ##########################################
An application for plotting histograms from a ROOT file with |matplotlib|. It is invoked from the command-line as ``rootplotmpl``.
Definition at line 530 of file core.py.
References python.rootplot.core.cli_rootplot().
def python.rootplot.core.config_string | ( | ) |
Definition at line 798 of file core.py.
Referenced by python.rootplot.core.add_from_config_files(), python.rootplot.core.Options.process_configs(), and python.rootplot.core.write_config().
def python.rootplot.core.diffpart | ( | targets | ) |
Definition at line 1664 of file core.py.
References join().
Referenced by python.rootplot.core.get_plotpath().
def python.rootplot.core.display_bin_text | ( | x, | |
y, | |||
nbins, | |||
text | |||
) |
Definition at line 1400 of file core.py.
References min().
Referenced by python.rootplot.core.display_overflow(), and python.rootplot.core.display_underflow().
def python.rootplot.core.display_overflow | ( | stack, | |
hist | |||
) |
Definition at line 1384 of file core.py.
References python.rootplot.core.display_bin_text().
Referenced by python.rootplot.core.plot_hists_root().
def python.rootplot.core.display_page_number | ( | options | ) |
def python.rootplot.core.display_underflow | ( | stack, | |
hist | |||
) |
Definition at line 1392 of file core.py.
References python.rootplot.core.display_bin_text().
Referenced by python.rootplot.core.plot_hists_root().
def python.rootplot.core.divide_axes | ( | fig, | |
axes, | |||
ratio_fraction | |||
) |
Definition at line 1466 of file core.py.
References validateAlignments.flatten().
Referenced by python.rootplot.core.plot_hists_mpl().
def python.rootplot.core.divide_canvas | ( | canvas, | |
ratio_fraction | |||
) |
def python.rootplot.core.fill_options | ( | args, | |
kwargs, | |||
scope | |||
) |
Definition at line 899 of file core.py.
References python.rootplot.core.parse_arguments(), and python.rootplot.core.parse_size().
Referenced by python.rootplot.core.initialize_hists(), and python.rootplot.core.rootplot().
def python.rootplot.core.get_labels | ( | hist, | |
options | |||
) |
Definition at line 1333 of file core.py.
References split.
Referenced by python.rootplot.core.initialize_hists().
def python.rootplot.core.get_plot_inputs | ( | files, | |
options | |||
) |
Definition at line 874 of file core.py.
References PVValHelper.add(), list(), and python.rootplot.core.walk_rootfile().
Referenced by python.rootplot.core.rootplot().
def python.rootplot.core.get_plotpath | ( | filenames, | |
targets | |||
) |
Definition at line 1671 of file core.py.
References python.rootplot.core.allsame(), python.rootplot.core.diffpart(), join(), and split.
Referenced by python.rootplot.core.process_options(), and python.rootplot.core.rootplot().
def python.rootplot.core.initialize_hists | ( | args, | |
kwargs | |||
) |
Definition at line 1213 of file core.py.
References python.rootplot.core.cartesian_product(), python.rootplot.core.fill_options(), python.rootplot.core.get_labels(), python.rootplot.core.load_matplotlib(), SiStripPI.max, python.rootplot.core.parse_range(), and python.rootplot.core.process_options().
Referenced by python.rootplot.core.plot().
def python.rootplot.core.load_matplotlib | ( | ext | ) |
Definition at line 1630 of file core.py.
References relativeConstraints.keys, and edm.print().
Referenced by python.rootplot.core.initialize_hists().
def python.rootplot.core.make_calls | ( | api_call, | |
save_call | |||
) |
def python.rootplot.core.make_html_index | ( | path, | |
dirs, | |||
files, | |||
filetype, | |||
template, | |||
ncolumns, | |||
width, | |||
height | |||
) |
Definition at line 1565 of file core.py.
References join().
Referenced by python.rootplot.core.plot_ratio_mpl(), and python.rootplot.core.rootplot().
def python.rootplot.core.make_ratio_hists | ( | hists, | |
options, | |||
ratio_index | |||
) |
Definition at line 1482 of file core.py.
Referenced by python.rootplot.core.plot_hists_mpl(), python.rootplot.core.plot_hists_root(), python.rootplot.core.plot_ratio_mpl(), and python.rootplot.core.plot_ratio_root().
def python.rootplot.core.merge_pdf | ( | options | ) |
Definition at line 1362 of file core.py.
References join(), and edm.print().
Referenced by python.rootplot.core.rootplot().
def python.rootplot.core.option_diff | ( | default, | |
modified | |||
) |
def python.rootplot.core.parse_arguments | ( | argv, | |
scope = 'global' |
|||
) |
Definition at line 1816 of file core.py.
References cmsPerfStripChart.dict, python.rootplot.utilities.find_num_processors(), join(), list(), and str.
Referenced by python.rootplot.core.cli_rootplot(), python.rootplot.core.fill_options(), and python.rootplot.core.Options.kwarg_list().
Definition at line 1307 of file core.py.
References SiStripPI.max.
Referenced by python.rootplot.core.process_options().
def python.rootplot.core.parse_legend_root | ( | options | ) |
Definition at line 1600 of file core.py.
References min().
Referenced by python.rootplot.core.plot_hists_root().
def python.rootplot.core.parse_range | ( | xedges, | |
expression | |||
) |
Definition at line 1591 of file core.py.
References funct.abs(), objects.autophobj.float, and min().
Referenced by python.rootplot.core.initialize_hists().
def python.rootplot.core.parse_size | ( | size_option | ) |
Definition at line 1299 of file core.py.
References objects.autophobj.float.
Referenced by python.rootplot.core.fill_options().
def python.rootplot.core.plot | ( | args, | |
kwargs | |||
) |
call signature:: plot(file1, file2, file3, ..., target, **kwargs): build a ROOT canvas, pulling the *target* histogram from each of the *files*. call signature:: plotmpl(file, target1, target2, target3, ..., **kwargs): build a ROOT canvas, pulling all *target* histograms from *file*. With either of these signatures, the plot style is specified through *kwargs*, which can accept any of the options available to :mod:`rootplot` at the command-line. Returns the tuple (*canvas*, *pads*, *stack*, *hists*, *plotpath*).
Definition at line 586 of file core.py.
References python.rootplot.core.initialize_hists(), python.rootplot.core.plot_hists_mpl(), and python.rootplot.core.plot_hists_root().
Referenced by python.rootplot.core.plotmpl().
def python.rootplot.core.plot_hists_mpl | ( | hists, | |
options | |||
) |
Definition at line 1025 of file core.py.
References PVValHelper.add(), python.rootplot.core.divide_axes(), createfilelist.int, python.rootplot.core.make_ratio_hists(), SiStripPI.max, and python.rootplot.core.plot_ratio_mpl().
Referenced by python.rootplot.core.plot().
def python.rootplot.core.plot_hists_root | ( | hists, | |
options | |||
) |
Definition at line 913 of file core.py.
References hippyaddtobaddatafiles.cd(), python.rootplot.core.display_overflow(), python.rootplot.core.display_page_number(), python.rootplot.core.display_underflow(), python.rootplot.core.divide_canvas(), createfilelist.int, python.rootplot.core.make_ratio_hists(), SiStripPI.max, python.rootplot.core.parse_legend_root(), python.rootplot.core.plot_ratio_root(), and python.rootplot.core.prep_first_draw().
Referenced by python.rootplot.core.plot().
def python.rootplot.core.plot_ratio_mpl | ( | axes, | |
hists, | |||
options | |||
) |
Definition at line 1527 of file core.py.
References python.rootplot.core.make_html_index(), and python.rootplot.core.make_ratio_hists().
Referenced by python.rootplot.core.plot_hists_mpl().
def python.rootplot.core.plot_ratio_root | ( | hists, | |
xlabel, | |||
options | |||
) |
Definition at line 1491 of file core.py.
References python.rootplot.core.make_ratio_hists().
Referenced by python.rootplot.core.plot_hists_root().
def python.rootplot.core.plotmpl | ( | args, | |
kwargs | |||
) |
The Application Programming Interface ###############################.
call signature:: plotmpl(file1, file2, file3, ..., target, **kwargs): build a matplotlib figure, pulling the *target* histogram from each of the *files*. call signature:: plotmpl(file, target1, target2, target3, ..., **kwargs): build a matplotlib figure, pulling all *target* histograms from *file*. With either of these signatures, the plot style is specified through *kwargs*, which can accept any of the options available to :mod:`rootplotmpl` at the command-line. Returns the tuple (*figure*, *axeses*, *stack*, *hists*, *plotpath*).
Definition at line 561 of file core.py.
References python.rootplot.core.plot().
def python.rootplot.core.prep_first_draw | ( | hist, | |
histmax, | |||
options | |||
) |
Definition at line 1410 of file core.py.
Referenced by python.rootplot.core.plot_hists_root().
def python.rootplot.core.process_options | ( | options | ) |
Definition at line 1688 of file core.py.
References python.rootplot.core.get_plotpath(), and python.rootplot.core.parse_color().
Referenced by python.rootplot.core.initialize_hists().
def python.rootplot.core.report_progress | ( | counter, | |
nplots, | |||
output, | |||
ext, | |||
divisor = 1 |
|||
) |
Definition at line 1355 of file core.py.
References edm.print().
Referenced by python.rootplot.core.rootplot().
def python.rootplot.core.rootplot | ( | args, | |
kwargs | |||
) |
call signature:: rootplot(file1, file2, file3, ..., **kwargs): build ROOT canvases from corresponding histograms in each of the *files*. call signature:: rootplot(file, folder1, folder2, folder3, ..., **kwargs): build ROOT canvases from corresponding histograms in each of the *folders* in *file*. call signature:: rootplot(file, target1, target2, target3, ..., **kwargs): build a ROOT canvas from each of the *targets* in *file*. With any of these call signatures, images are generated in an output directory along with a script with the necessary calls to :func:`plot` to reproduce each of the canvases. The plot style is specified through *kwargs*, which can accept any of the options available to :mod:`rootplot` at the command-line.
Definition at line 644 of file core.py.
References cmsPerfStripChart.dict, python.rootplot.core.fill_options(), python.rootplot.core.get_plot_inputs(), python.rootplot.core.get_plotpath(), createfilelist.int, join(), python.rootplot.core.make_calls(), python.rootplot.core.make_html_index(), python.rootplot.core.merge_pdf(), edm.print(), python.rootplot.core.report_progress(), str, python.rootplot.core.walk_rootfile(), python.rootplot.core.write_config(), and python.rootplot.core.write_to_file().
Referenced by python.rootplot.core.cli_rootplot(), and python.rootplot.core.rootplotmpl().
def python.rootplot.core.rootplotmpl | ( | args, | |
kwargs | |||
) |
call signature:: rootplotmpl(file1, file2, file3, ..., **kwargs): build ROOT canvases from corresponding histograms in each of the *files*. call signature:: rootplotmpl(file, folder1, folder2, folder3, ..., **kwargs): build ROOT canvases from corresponding histograms in each of the *folders* in *file*. call signature:: rootplotmpl(file, target1, target2, target3, ..., **kwargs): build a ROOT canvas from each of the *targets* in *file*. With any of these call signatures, images are generated in an output directory along with a script with the necessary calls to :func:`plotmpl` to reproduce each of the canvases. The plot style is specified through *kwargs*, which can accept any of the options available to :mod:`rootplotmpl` at the command-line.
Definition at line 613 of file core.py.
References python.rootplot.core.rootplot().
def python.rootplot.core.walk_rootfile | ( | path, | |
rootfile, | |||
options | |||
) |
Definition at line 849 of file core.py.
Referenced by python.rootplot.core.get_plot_inputs(), and python.rootplot.core.rootplot().
def python.rootplot.core.write_config | ( | ) |
Definition at line 810 of file core.py.
References python.rootplot.core.config_string(), and edm.print().
Referenced by python.rootplot.core.rootplot().
def python.rootplot.core.write_to_file | ( | script, | |
destination | |||
) |
Implementation ######################################################.
Definition at line 778 of file core.py.
Referenced by python.rootplot.core.Options.process_configs(), and python.rootplot.core.rootplot().
python.rootplot.core.batch |
Use ROOT's batch mode, unless outputting to C macros, since there is a bug in pyROOT that fails to export colors in batch mode.
Definition at line 65 of file core.py.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >.allocateBatch(), EcalTrivialConditionRetriever.produceEcalLaserAlphas(), and Json::BatchAllocator< AllocatedType, objectPerAllocation >.~BatchAllocator().