ryan roth wrote: > > 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. > Hy Ryan, I cannot reproduce your problem. DrawCopy correctly saves the drawing option into the copies histogram. > 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. This, again, I cannot understand. > > 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. You can use MarkerStyle 7 (bigger dots) or scalable marker 20. > > 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. Again, I do not understand. Did you try? h->Draw("l"); // draw a line between points h->Draw("c"); //draw a smooth line between points h->Draw("p"); //draw marker at each point (use SetMarkerStyle) h->Draw("cp"); draw a marker and a smooth line, etc > > 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. No, this should be the same. We will need to see your application/code for more investigation. Rene Brun > > Thank you all for you assistance. > > Ryan Roth, New List Member > PHENIX, BNL > rothr@db.erau.edu
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:40 MET