specifying a single subplot to TQDefaultPlotter draws it twice
Using TQDefaultPlotter
, I want to have only a ratio subplot and thus specify plotter.style.subPlot: ratio
in my visualize config. However, the ratio plot gets drawn twice, see attached.
Poking around a bit with print statements (see patch below) indicates that both if(tags.getTagString("style.subPlot",subplotTypeString)){
(line 84) and for(auto subplot:tags.getTagVString("style.subPlot")){
(line 88) get executed, thus the tag is read twice and two subplots are created.
@@ -87,6 +87,7 @@ TCanvas * TQDefaultPlotter::makePlot(TQTaggable& tags){
}
for(auto subplot:tags.getTagVString("style.subPlot")){
subplot_strings.push_back(subplot);
+ VERBOSEclass("requesting subplot %s", subplot.Data());
}
for(const auto& subplotString:subplot_strings){
SubPlotType subplot = None;
@@ -100,6 +101,7 @@ TCanvas * TQDefaultPlotter::makePlot(TQTaggable& tags){
if (plottype != Stack)
continue;
if(subplot != None)
+ VERBOSEclass("pushing back subplot type %s", subplotString.Data());
subplots.push_back(subplot);
}
@@ -300,6 +302,7 @@ TCanvas * TQDefaultPlotter::makePlot(TQTaggable& tags){
//////////////////////////////////////////////////////
int isub = subplots.size();
+ VERBOSEclass("making %i subplots", isub);
for(const auto& subplot:subplots){
--isub;
canvas->cd();