Line attributes in lego1 & lego2

[quote]This is the best we can do for now without deep changes I reckon.[/quote]Unless a DrawFillAreaWithBorders() method exist or be implemented.
Unfortunately this does not seem to be the case

// TVirtualX // Semi-Abstract base class defining a generic interface to the // underlying, low level, graphics system (X11, Win32, MacOS).
Cheers,
Z

Hi again,

In order to be complete attached’s an extension of the last patch that also:

The archive ztest.tgz contains the programs used to generate these outputs.
Run ztest.max (it will compile and execute stack0.cpp & stack1.cpp).

The diff files attached (THistPainter.cxx.diff & TPainter3dAlgorithms.cxx.diff) were generated against trunk rev 2fa236059378392c87f53e4821adb7593ad3955e.
So TPainter3dAlgorithms.cxx.diff cancels and replaces TPainter3dAlgorithms.cxx.3.diff above.

Enjoy! :slight_smile:
Z
TPainter3dAlgorithms.cxx.diff (17.1 KB)
THistPainter.cxx.diff (1.61 KB)
ztest.tgz (3.6 KB)

Hello,

I was away last week. Give me time to recover my emails and I will look at this.

Olivier

A bit of time this week?
Cheers,
Z

Yep, but this THistPainter patch is not appropriate now. I get:

imaccouet:roottrunk couet$ patch  -p1 < /Users/couet/Downloads/THistPainter.cxx.diff
patching file hist/histpainter/src/THistPainter.cxx
Hunk #1 succeeded at 6604 (offset 10 lines).
Hunk #2 succeeded at 7768 (offset 15 lines).
Hunk #3 succeeded at 7845 (offset 15 lines).
Hunk #4 succeeded at 7929 (offset 15 lines).

Can you provide a diff against the latest version ?
Thanks :slight_smile:

Here we go.
Could you please run ztest.max (see ztest.tgz above) and make sure you get the same plots as above?
Cheers,
Z
THistPainter.cxx.5.diff (1.61 KB)

I will :slight_smile:

Ok it seems fine. Sorry to ask you but I lost a bit the tracks of your mods now. Can you provide me a small
piece of text for the release notes explaining what this patches are supposed to do ?

also, In you code I see:

   for (i=0;i<fNStack;i++) { fColorMain[i] = 1; fColorDark[i] = 1; fEdgeColor[i] = kMagenta; fEdgeStyle[i] = 10; fEdgeWidth[i] = 10; }  /// default foolish values for errors to be spotted easily

That’s sounds a bit like a dirty trick, specially with a just comment :frowning: … I do not like this too much …

[quote]Can you provide me a small piece of text for the release notes explaining what these patches are supposed to do ?[/quote]This patch allows to take into account line attributes (color, style, width) when drawing a TH2 in lego or surf mode whatever the coordinate system used (car, pol, cyl, sph, (and psr)). It also handles THStack (lego only).

[quote]for (i=0;i<fNStack;i++) { fColorMain[i] = 1; fColorDark[i] = 1; fEdgeColor[i] = kMagenta; fEdgeStyle[i] = 10; fEdgeWidth[i] = 10; } /// default foolish values for errors to be spotted easilyThat sounds a bit like a dirty trick, specially with a just comment :frowning: … I do not like this too much …[/quote]Not at all. These were just the default values I used to make sure eveything was going fine i.e. no apparition of huge (width=10) “dotted” (style=10) magenta (color=kMagenta) lines on screen. You can set everything to 1 and remove the comment safely.

Cheers,
Z

You can set everything to 1 and remove the comment safely.

I will go that way. That kind of comment becomes very quickly very obscure with time
and does not help developers coming after.

Patch applied. Let me know if ok.

Your last mods generate a big bug in surface plotting.
See the result of the SURF3 option in the attached plot.
Can you fix that please ?
sg35.pdf (152 KB)

the way to reproduce it is:

TH2D * histo = new TH2D ("histo","histo",20,-5.,5.,20,-5.,5.) ;
histo->FillRandom("gaus",1000) ;
histo->SetStats(kFALSE) ;
histo->SetFillColor(kRed) ;
histo->SetLineColor(kBlack) ;
histo->Draw("surf3");

Ok, now fixed.

Actually I could not reproduce your problem: the 2D col plane always lies above the 3D plot in my case (your example and all the plots provided above).
But if you managed to fix it in your case, everything’s fine.
Note that the change made (I never touched this part!) should be corrected though. A semicolon rather than a comma (between the assignments) would be better I reckon (see lines 114 & 198).
Cheers,
Z

You are right. Now changed.

Hi Olivier,

I’m a bit disappointed these changes
(and others [url]TH1::Integral(“width”) in TPaveStats (statbox) & [url]No shadow in lego1
did not get implemented in the last ROOT patch release (v5-34-09)
(I’m very happy they got commited to the trunk though).
Should I provide the corresponding patches against the head of the “v5-34-00-patches” branch
to see them included in the next patch release (v5-34-10)?

Cheers,
Z

Yes

Here we go (diff against heads/v5-34-00-patches@v5-34-09-10-g2ed83fa)
It holds for the 3 posts abovementioned (attline for lego & surf, lego4 and TH1::Integral(“width”) in TPaveStats) since all bring in THistPainter.cxx.
Checks passed using the different test macros provided.
Cheers,
Z
patch6.tgz (8.3 KB)

Please note patch6.tgz is a terrible name since it is not meant for the master branch.
It should be read patch-v5-34-00-patches.tgz.
The names inside the archive are properly named.
Cheers,
Z