|
From: Daniel J S. <dan...@ie...> - 2004-09-27 21:22:24
|
Ethan Merritt wrote: >On Monday 27 September 2004 02:18 pm, Daniel J Sebald wrote: > > >>it. As Ethan pointed out, there are couple schemes: >> >>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. >> >> >>In the former case, gnuplot should only be sending over the palette when >>it changes. In the latter, gnuplot should send every time so that it >>goes into the plot buffer. Right now, gnuplot_x11 is set up for (a), >>but gnuplot sends the palette every time a plot is done. That would >>prevent gnuplot_x11 from testing every plot if the palette changed. >> >> > >It is strictly necessary for x11.trm to send the palette with each new >plot, because it has no way of knowing which if any of the previous >plots are still active in gnuplot_x11. > >Why don't you switch gnuplot_x11 over to using scheme (b), >and we can see just how much of a hit we take in execution time. > Because I'm almost done with scheme (a)... changing over to scheme (b) is the same amount of headaches. Saving it in the buffer is easy enough, but then have to add the code to handle it when it comes out of the buffer, i.e., recolor the window. Maybe not too bad. Then there are the unforseen things like maybe the palette has to be the first thing in the buffer otherwise the plotted elements will first be in one color map and then half-way though the plot switch over to another color map. Dan |