dsimcha Wrote: > The problem with the with statement idea is that you still need to > declare the variable. I often throw up quick anonymous plots with > anonymous Figure objects, like: > > Histogram(someDataSet).toFigure > .title("A Title") > .xLabel("Stuff") > .showAsMain();
It's also easier to debug code if you store objects in variables. What if histogram is created with a bug, how would you diagnose it? If you have the histogram stored in a variable, you can put a breakpoint after the assignment and inspect the histogram, but your example doesn't provide a variable to inspect.