 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Plots_with_ROOT</id>
	<title>Plots with ROOT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Plots_with_ROOT"/>
	<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Plots_with_ROOT&amp;action=history"/>
	<updated>2026-05-14T09:29:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.lhep.unibe.ch/index.php?title=Plots_with_ROOT&amp;diff=393&amp;oldid=prev</id>
		<title>Lhep: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Plots_with_ROOT&amp;diff=393&amp;oldid=prev"/>
		<updated>2015-03-18T07:49:28Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:49, 18 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lhep</name></author>
	</entry>
	<entry>
		<id>https://wiki.lhep.unibe.ch/index.php?title=Plots_with_ROOT&amp;diff=392&amp;oldid=prev</id>
		<title>130.92.139.58 at 09:08, 30 August 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Plots_with_ROOT&amp;diff=392&amp;oldid=prev"/>
		<updated>2007-08-30T09:08:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* To &amp;quot;turn off&amp;quot; the &amp;#039;&amp;#039;&amp;#039;gray background&amp;#039;&amp;#039;&amp;#039;: gROOT-&amp;gt;SetStyle(&amp;quot;Plain&amp;quot;); (make sure to #include &amp;lt;TROOT.h&amp;gt; in compiled applications otherwise compiler won&amp;#039;t know what gROOT is)&lt;br /&gt;
* To &amp;#039;&amp;#039;&amp;#039;keep title from being displayed&amp;#039;&amp;#039;&amp;#039;: gStyle -&amp;gt; SetOptTitle(kFALSE);&lt;br /&gt;
* To &amp;#039;&amp;#039;&amp;#039;keep statistics box from being displayed&amp;#039;&amp;#039;&amp;#039;: gStyle -&amp;gt; SetOptStat(kFALSE);&lt;br /&gt;
* To change &amp;#039;&amp;#039;&amp;#039;histogram line width&amp;#039;&amp;#039;&amp;#039; (default = 1): histo -&amp;gt; SetLineWidth(2);&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Line style&amp;#039;&amp;#039;&amp;#039; (0: solid; 1:dotted; 2:dashed 3:dot-dash): histo -&amp;gt; SetLineStyle(3);&lt;br /&gt;
* To change &amp;#039;&amp;#039;&amp;#039;marker style&amp;#039;&amp;#039;&amp;#039;: histo -&amp;gt; SetMarkerStyle(23);&lt;br /&gt;
* To change &amp;#039;&amp;#039;&amp;#039;marker colour&amp;#039;&amp;#039;&amp;#039;: histo -&amp;gt; SetMarkerColor();&lt;br /&gt;
* To &amp;#039;&amp;#039;&amp;#039;scale a histogram&amp;#039;&amp;#039;&amp;#039;: histo -&amp;gt; Scale( float scale_factor);&lt;br /&gt;
* To &amp;#039;&amp;#039;&amp;#039;add labels&amp;#039;&amp;#039;&amp;#039; to the x-axis of a histogram: histo -&amp;gt; GetXaxis() -&amp;gt; SetTitle(&amp;quot;#sqrt{s} (GeV)&amp;quot;);&lt;br /&gt;
* Changing the &amp;#039;&amp;#039;&amp;#039;size of the axis title&amp;#039;&amp;#039;&amp;#039;: histo -&amp;gt; GetXaxis() -&amp;gt; SetTitleSize(0.048);&lt;br /&gt;
* To &amp;#039;&amp;#039;&amp;#039;move the title&amp;#039;&amp;#039;&amp;#039; closer/farther away from the plot: histo -&amp;gt; GetXaxis() -&amp;gt; SetTitleOffset(1.4);  // arg is multiplicative factor.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Axis labels&amp;#039;&amp;#039;&amp;#039; if you have a function: funcn -&amp;gt; GetHistogram() -&amp;gt; GetXaxis() -&amp;gt; SetTitle(&amp;quot;#sqrt{s} (GeV)&amp;quot;);&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Axis labels&amp;#039;&amp;#039;&amp;#039; if you have a graph: graph -&amp;gt; GetHistogram() -&amp;gt; GetXaxis() -&amp;gt; SetTitle(&amp;quot;#sqrt{s} (GeV)&amp;quot;); for the y-axis, replace  GetXaxis() with GetYaxis().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Change color palette&amp;#039;&amp;#039;&amp;#039; on histogram:  gStyle-&amp;gt;SetPalette(8,NULL);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes making a TGraph, data is plotted but you don&amp;#039;t like the &amp;#039;&amp;#039;&amp;#039;ranges on the axes&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* Step 1) Make a canvas as usual (eg. mycanvas)&lt;br /&gt;
* Step 2) TH1F* histo = mycanvas -&amp;gt; DrawFrame(lowx, lowy, hix, hiy); (DrawFrame returns a pointer to a TH1F object)&lt;br /&gt;
* Step 3) Label axes with histogram pointer: histo -&amp;gt; GetXaxis() -&amp;gt; SetTitle(&amp;quot;#sqrt{s} (GeV)&amp;quot;);&lt;br /&gt;
* Step 4) Draw graph (do not use the &amp;quot;A&amp;quot; option as DrawFrame has drawn the axes for you already): graph -&amp;gt; Draw(&amp;quot;P*&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to &amp;#039;&amp;#039;&amp;#039;fit a graph&amp;#039;&amp;#039;&amp;#039; with an arbitrary function:&lt;br /&gt;
* Create a function with parameters. Here, they are [0] and [1].&lt;br /&gt;
* TF1* f90 = new TF1(&amp;quot;f90&amp;quot;, &amp;quot;[0]+[1]/x&amp;quot;, 1., 40.);&lt;br /&gt;
* graph -&amp;gt; Fit (f90, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, 4., 40.);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Filling Histograms&amp;#039;&amp;#039;&amp;#039;: It&amp;#039;s a really good idea to set the fill style as well as the color.&lt;br /&gt;
* eg. histo -&amp;gt; SetFillColor(7);&lt;br /&gt;
* hist0 -&amp;gt; SetFillStyle(1001); // This is for a solid fill.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes drawing your histogram or whatever, you find it doesn&amp;#039;t fit on the canvas.  To give the margins a little more room for things to fit properly, do the following:&lt;br /&gt;
* canvas -&amp;gt; SetRightMargin(0.15); (the default canvas has this set at 0.1, so if you want bigger, you need to put in a value of &amp;gt;0.1.) (also comes in Left, Top, abd Bottom flavours)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make quantities displayed in the axis use scientific notation:&lt;br /&gt;
* TGaxis::SetMaxDigits(3);&lt;/div&gt;</summary>
		<author><name>130.92.139.58</name></author>
	</entry>
</feed>