Some Minor Difficulties with TH2D::Draw()

ryan roth (rothr@db.erau.edu)
Thu, 19 Nov 1998 10:39:12 -0500 (EST)


Hello everyone:

I have been developing a GUI application, similiar to the guitest
program, which allows a user to pull information from an Objectivity
database, fill a Histogram or Graph object, and then draw it to a canvas.

As I was adding some 2D histogram functionality, I ran into some odd
occurences I was hoping someone on this list could assist me with.

First, I discovered that, if I use the DrawCopy() function of a TH2D, the
plot style always defaults to a scatter plot, no matter what options I
give it. Draw() works normally, but I would like to use DrawCopy(), as it
would allow the user to rotate Lego and Surface plots.

Second, for some reason I cannot determine, whenever the 'SURF4' option
is used, the surface always appears as pure white, with no shading
whatsoever. To answer the obvious question, yes, I did change the color
beforehand. I have been able to get the appropriate shading in a macro,
but not in this application.

Third, is it possible, in a standard 2D scatter plot, to increase the
size of the points plotted? My application, at this time, typically
involves a number of 'events' on the order of 50-100, rather than thousands.
With the scatter plot points at their default size, the resultant plot is
very hard to view.

Other question I had regards 1D histograms -- is there some particular
reason why they cannot seem to be drawn with a smooth curve or line AND
markers? Whenever I try (in both macros and in my application) the
resulting picture only includes markers.

It is possible that some of my difficulties arise from the fact that I am
not running off of cint -- my application functions as a stand-alone
program, which simply includes the ROOT libraries and starts using them
(much like guitest does). It occured to me that opperating in this
manner may leave some important variables or objects (which cint might
automatically define) undeterminate, thus causing some of the library
functions to operate improperly. Are there any objects, other than a
TROOT and a TApplication, which should be declared in a program such as
this? I should point out that my main() function is virtually identical
to the one used in guitest.

Thank you all for you assistance.

Ryan Roth, New List Member
PHENIX, BNL
rothr@db.erau.edu