From 3bcc0fcfdb75c6e6a821087a76ef5864ed09ab13 Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Wed, 15 Aug 2007 07:38:16 +0000
Subject: [PATCH] Implement the following changes in TGraph::Draw   -when
 option "same" is specified it is ignored   -when option "a" is specified the
 pad is cleared

git-svn-id: http://root.cern.ch/svn/root/trunk@19623 27541ba8-7e3a-0410-8455-c3a389f83636
---
 graf/src/TGraph.cxx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/graf/src/TGraph.cxx b/graf/src/TGraph.cxx
index 243e212562c..bfd48564f4f 100644
--- a/graf/src/TGraph.cxx
+++ b/graf/src/TGraph.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraph.cxx,v 1.215 2007/04/30 20:38:08 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraph.cxx,v 1.216 2007/05/11 15:18:49 brun Exp $
 // Author: Rene Brun, Olivier Couet   12/12/94
 
 /*************************************************************************
@@ -619,19 +619,20 @@ void TGraph::Draw(Option_t *option)
    TString opt = option;
    opt.ToLower();
 
-   //if (opt.Contains("same"))
-   //   Error("Draw", "option \"same\" not supported,\n"
-   //         "see TGraph::PaintGraph() for options");
+   if (opt.Contains("same")) {
+      opt.ReplaceAll("same","");
+   }
 
    // in case of option *, set marker style to 3 (star) and replace
    // * option by option P.
    Ssiz_t pos;
    if ((pos = opt.Index("*")) != kNPOS) {
       SetMarkerStyle(3);
-      opt.Replace(pos, 1, "P");
+      opt.Replace(pos, 1, "p");
    }
    if (gPad) {
       if (!gPad->IsEditable()) gROOT->MakeDefCanvas();
+      if (opt.Contains("a")) gPad->Clear();
    }
    AppendPad(opt);
 }
-- 
GitLab