On Tue, 21 Aug 2001, Christian Hansen wrote:
Hi Christian
the following should work:
{
gStyle->SetFillStyle(1001); // solid
gStyle->SetFillColor(6); // magenta
// TCanvas * c = new TCanvas("c","c", 500,500);
Int_t n = 5;
Double_t x[5] = {0.,1.,2.,0.,0.};
Double_t y[5] = {0.,0.,1.,1.,0.};
//TPolyLine pl = new TPolyLine(n, x, y, "F");
TPolyLine * pl = new TPolyLine(n,x,y,"F");
pl->Draw();
}
Cheers
Otto
>
> Hi everybody,
>
> I need to be able to fill an arbitrary area with a color.
>
> I've tried to use PaintPolyLine on a TPolyLine, but I don't manage to
> define in a correct way a TPolyLine, I guess since I don't know what to
> write for the "option" (cannot find any example in the Users Guide).
>
> If anybody could give me hints how to get the attached macro working I
> would be very glad...
>
> Cheers,
> / Christian Hansen
>
Otto Schaile Sektion Physik, LMU Muenchen
Phone: +49 89 289 14070 Am Coulombwall 1, D-85748 Garching, Germany
GSM: +49 160 1553598
FAX: +49 89 289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET