From: Geoffrey F. <geo...@at...> - 2010-06-07 15:17:36
|
Arjen Markus writes: > Hello, > > I have been looking at the issues that arose with running the examples > in Tcl or Tk one after another and I have an almost working solution > now (based on examples/tk/standard_examples.in and > examples/tk/tkdemos.tcl). Here is the idea: > > tcldemos.tcl (adapted from examples/tk/tkdemos.tcl, added a few > commands to get PLplot back to its initial settings): > # > # Comments ... > # > for {set i 1} {$i <= 31} {incr i} { > set demo x[format "%02d" $i] > source $demo.tcl > # restore defaults > proc $i {} " > $demo > loopback cmd pleop > loopback cmd plcol0 1 > loopback cmd plsori 0 > loopback cmd plspal0 cmap0_default.pal > loopback cmd plspal1 cmap1_default.pal 1 > loopback cmd plstransform NULL > " > } > [...] > In the process I noticed: > > - Example x17 (the stripchart demo) does not update the axis properly > - they are not cleaned up. This is the case for the C version too. > > - Example x19 sets the map transformation, but this influences the > examples x20 and x21 as well. Setting the transformation to NULL > makes the effect go away. Was that to be expected? Setting the transform to NULL at the end of x19 is undoubtedly the right thing to do. Leaving the transform sete will affect anything that follows in the same process, as you noted. |