Plot2kill 0.2

Kagamin spam at here.lot
Thu Mar 10 08:15:53 PST 2011


dsimcha Wrote:

> They work about as well as a with() statement and not as well as method 
> chaining.  The problem is that the toFigure call returns a different 
> type.  The idiomatic way to use Plot2kill is to create a Plot, set all 
> the Plot properties you need, call toFigure, then set all the Figure 
> properties you need.  (Plot and Figure are distinct because you can have 
> more than one Plot on a Figure, though you often don't.)  Example:
> 
> Histogram(someDataSet, 10)
>      .barColor(getColor(255, 0, 0))
>      .histType(HistType.Probability)
>      .toFigure
>      .title("A Histogram")
>      .showAsMain();

new Figure
{
   title="A Histogram",
   new Histogram
   {
      barColor=getColor(255, 0, 0),
      histType=HistType.Probability
   }
}

not sure, what showAsMain means.


More information about the Digitalmars-d-announce mailing list