# Line attributes in lego1 & lego2

**URL:** <https://root-forum.cern.ch/t/line-attributes-in-lego1-lego2/16152>\
**Category:** ROOT\
**Created:** [May 27, 2013, 12:07pm UTC](https://root-forum.cern.ch/t/line-attributes-in-lego1-lego2/16152 "2013-05-27T12:07:02Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Zesp](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/b5ac83/32.png) [@Zesp](https://root-forum.cern.ch/u/Zesp)\
**Post date:** [May 30, 2013, 12:34am UTC](https://root-forum.cern.ch/t/line-attributes-in-lego1-lego2/16152/7 "2013-05-30T00:34:48Z")

</div>

Actually this does not work for THStack.  
The patch below fixes this.  
Attached’s also the program I used to make sure everything went fine.  
All the pictures generated (png & pdf) lie in the “before & after patch” archives.  
Below’s an example:

 ![](https://root-forum.cern.ch/uploads/default/original/2X/c/cbd1be949ddfd1bae6550add5ab6cab4d436488a.png)  

Could you please commit this to the trunk?

Please note the “Draw bottom face” part of TPainter3dAlgorithms::LegoCartesian() should be further upgraded when THStack will correctly handle TH2 with negative data (see [THStack & TH2 with negative values](https://root-forum.cern.ch/t/thstack-th2-with-negative-values/16161/1))

Cheers,  
Z  
[lego\_attline\_patch.gitdiff.tgz](https://root-forum.cern.ch/uploads/default/original/2X/5/504f8beed3a543ad1e1dd15e822dfec7c57b3a1f.tgz) (3.25 KB)  
[zztest.cpp](https://root-forum.cern.ch/uploads/default/original/2X/1/13210ffb51b82a1fbb6776dfe6e16a9522e02e9a.cpp) (8.77 KB)  
[canvases.afterpatch.tgz](https://root-forum.cern.ch/uploads/default/original/2X/a/a827b83ae83102bac3213695490f04517b862b9d.tgz) (374 KB)  
[canvases.beforepatch.tgz](https://root-forum.cern.ch/uploads/default/original/2X/b/ba96fca20fb8aba5b4f861c33b4b8ce7b3db9fac.tgz) (418 KB)

---

_[View the full topic](https://root-forum.cern.ch/t/line-attributes-in-lego1-lego2/16152)._
