[Tioga-users] Marker outside plot area
David MacMahon
davidm at astro.berkeley.edu
Mon May 19 14:06:47 EDT 2008
On May 19, 2008, at 10:57 , Edwin wrote:
> cmd = Proc.new do
> ...
> end
> t.set_bounds( mybounds )
> t.context { cmd.call( self ) }
> t.show_plot_box
Hi, Edwin,
If that's the only use of your "cmd" Proc object, you can rewrite
this as...
t.set_bounds( my_bounds )
t.context do
...
end
t.show_plot_box
My guess is that the "..." part uses the "t" variable, so you can
either use it from the "closure" or you can pass it in explicitly by
changing the t.context line to...
t.context do |t|
I'm not sure if there's any performance penalty for one way vs the
other.
Dave
More information about the Tioga-users
mailing list