|
From: Ethan M. <merritt@u.washington.edu> - 2004-09-27 18:07:54
|
This may be a stupid question, but is there not a much more straightforward way of handling this? The basic layout of gnuplot_x11 is that commands are read from the input stream and either (a) executed immediately (e.g. "close window #5") or (b) stored in a list to be executed every time the current plot is redrawn. Right now setting the palette is treated as category (a). That is, the routine scan_palette_from_buf() is executed immediately but the information is not stored with the plot. Can't you fix this problem by moving the operation into category (b) instead? Just store the stream of palette information as part of the plot, and then execute scan_palette_from_buf() each time the plot is redrawn. I don't know what the speed impact of this might be. But if it works at all, you could worry later about optimizing it by keeping some sort of global flag that tracks the last palette loaded, and skip the reload if it hasn't changed. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |