|
[Rivet-svn] r2940 - in trunk: . bin docblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Feb 18 20:35:27 GMT 2011
Author: hoeth Date: Fri Feb 18 20:35:27 2011 New Revision: 2940 Log: Support for transparency in make-plots Modified: trunk/ChangeLog trunk/bin/make-plots trunk/doc/make-plots.txt Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Fri Feb 18 19:32:08 2011 (r2939) +++ trunk/ChangeLog Fri Feb 18 20:35:27 2011 (r2940) @@ -1,3 +1,11 @@ +2011-02-18 Hendrik Hoeth <hendrik.hoeth at cern.ch> + + * Support for transparency in make-plots + +2011-02-18 Frank Siegert <frank.siegert at cern.ch> + + * Added ATLAS prompt photon analysis ATLAS_2010_S8914702 + 2011-02-10 Hendrik Hoeth <hendrik.hoeth at cern.ch> * Simple NOOP constructor for Thrust projection * Add CMS event shape analysis. Data read off the plots. We Modified: trunk/bin/make-plots ============================================================================== --- trunk/bin/make-plots Fri Feb 18 19:32:08 2011 (r2939) +++ trunk/bin/make-plots Fri Feb 18 20:35:27 2011 (r2940) @@ -707,11 +707,13 @@ out += ('\\rput[Bl](0.1,' + str(ypos) + '){' + title + '}\n') out += ('\\rput[Bl](0.1,%s){%s\n' %(ypos,'%')) if drawobject.getErrorBands(): - out += ('\\psframe[linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=%s]' %drawobject.getErrorBandColor()) + out += ('\\psframe[linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=%s,opacity=%s]' %(drawobject.getErrorBandColor(),drawobject.getErrorBandOpacity())) out += ('(-0.10, 0.033)(-0.02, 0.001)\n') out += ('\\psline[linestyle=' + drawobject.getLineStyle() \ + ', linecolor=' + drawobject.getLineColor() \ - + ', linewidth=' + drawobject.getLineWidth()) + + ', linewidth=' + drawobject.getLineWidth() \ + + ', strokeopacity=' + drawobject.getLineOpacity() \ + + ', opacity=' + drawobject.getFillOpacity()) if drawobject.getLineDash()!='': out += (', dash=' + drawobject.getLineDash()) if drawobject.getFillStyle()!='none': @@ -730,6 +732,8 @@ + ', linestyle=' + drawobject.getLineStyle() \ + ', fillstyle=' + drawobject.getFillStyle() \ + ', fillcolor=' + drawobject.getFillColor() \ + + ', strokeopacity=' + drawobject.getLineOpacity() \ + + ', opacity=' + drawobject.getFillOpacity() \ + ', hatchcolor=' + drawobject.getHatchColor()) if drawobject.getFillStyle()!='none': out += ('](-0.06, 0.028)\n') @@ -904,12 +908,24 @@ else: return 'black' + def getLineOpacity(self): + if self.description.has_key('LineOpacity'): + return self.description['LineOpacity'] + else: + return '1.0' + def getFillColor(self): if self.description.has_key('FillColor'): return self.description['FillColor'] else: return 'white' + def getFillOpacity(self): + if self.description.has_key('FillOpacity'): + return self.description['FillOpacity'] + else: + return '1.0' + def getHatchColor(self): if self.description.has_key('HatchColor'): return self.description['HatchColor'] @@ -958,6 +974,12 @@ else: return 'yellow' + def getErrorBandOpacity(self): + if self.description.has_key('ErrorBandOpacity'): + return self.description['ErrorBandOpacity'] + else: + return '1.0' + def getSmoothLine(self): if self.description.has_key('SmoothLine'): return bool(int(self.description['SmoothLine'])) @@ -978,6 +1000,8 @@ out += ('\\psset{fillstyle='+self.getFillStyle()+'}\n') out += ('\\psset{fillcolor='+self.getFillColor()+'}\n') out += ('\\psset{hatchcolor='+self.getHatchColor()+'}\n') + out += ('\\psset{strokeopacity='+self.getLineOpacity()+'}\n') + out += ('\\psset{opacity='+self.getFillOpacity()+'}\n') if self.getLineDash()!='': out += ('\\psset{dash='+self.getLineDash()+'}\n') return out @@ -990,6 +1014,8 @@ out += ('\\psset{fillstyle=none}\n') out += ('\\psset{fillcolor=white}\n') out += ('\\psset{hatchcolor=black}\n') + out += ('\\psset{strokeopacity=1.0}\n') + out += ('\\psset{opacity=1.0}\n') return out @@ -1222,7 +1248,7 @@ if self.getErrorBands(): self.description['SmoothLine']=0 for i in range(len(self.data)): - out += ('\\psframe[dimen=inner,linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=%s]' %self.getErrorBandColor()) + out += ('\\psframe[dimen=inner,linewidth=0pt,linestyle=none,fillstyle=solid,fillcolor=%s,opacity=%s]' %(self.getErrorBandColor(),self.getErrorBandOpacity())) out += ('(' + coors.strphys2frameX(self.data[i]['LowEdge']) + ', ' \ + coors.strphys2frameY(self.data[i]['Content']-self.data[i]['Error'][0]) + ')(' \ + coors.strphys2frameX(self.data[i]['UpEdge']) + ', ' \ Modified: trunk/doc/make-plots.txt ============================================================================== --- trunk/doc/make-plots.txt Fri Feb 18 19:32:08 2011 (r2939) +++ trunk/doc/make-plots.txt Fri Feb 18 20:35:27 2011 (r2940) @@ -374,6 +374,11 @@ HSB-colors. -------------------- +LineOpacity=<opacity> +-------------------- +Set the opacity of the line. Default is 1.0. This might not work for ps output. + +-------------------- LineWidth=<width> -------------------- Width of the line. @@ -411,6 +416,12 @@ See `LineColor` for examples of color definitions. -------------------- +FillOpacity=<opacity> +-------------------- +Set the opacity of the solid fillcolor. Default is 1.0. This might not work for +ps output. + +-------------------- HatchColor=<color> -------------------- The color of a hatch pattern used for filling the area below a histogram. This @@ -433,6 +444,12 @@ of color definitions). -------------------- +ErrorBandOpacity=<opacity> +-------------------- +Set the opacity of the error band. Default is 1.0. This might not work for ps +output. + +-------------------- PolyMarker=<dotstyle> -------------------- The marker style of the points. Any dot style which is understood by pstricks
More information about the Rivet-svn mailing list |