From: Daniel J S. <dan...@ie...> - 2004-07-27 20:11:47
|
Since on the subject of plot/key placement. I notice there is a bit of code for making the plot grid avoid the key box so that the lines don't interfere with what is in the key. That is good. However, notice that the same isn't done for the plot curves. Those will write in the same space as the key. I wonder if the plot lines as well should not interfere with the key. That breaking up of the grid lines seems like a low level function to me. An alternate method of achieving a similar effect is to allow the grid lines and plot lines to be drawn, but then put the key over the top by first drawing a rectangular filled polygon to cover up or "erase" whatever is on the plot. This scheme works for PostScript I'm sure. It seems like X11 should work as well. How about the other terminals like PDF, JPEG, etc.? A filled polygon is probably a tad slower at the driver level than would be truncating the grid/plot lines, but not too noticeable I'd think. Then, the box feature of key could have an option of "transparent | opaque" with the obvious behavior. I think that would actually simplify the gnuplot code. For example, as part of this /* Calculate space for keys to prevent grid overwrite the is a comment /* FIXME!!! ** pm 22.1.2002: if key->user_pos.scalex or scaley == first_axes or second_axes, ** then the graph scaling is not yet known and the box is positioned incorrectly; ** you must do "replot" to avoid the wrong plot ... bad luck if output does not ** go to screen */ Would a scheme like I describe get rid of this problem? Are there situations where no grid lines yet the data/traces fall inside the key? Could that be accomplished with some additional option, e.g., plot all of these is some specifiable... if that's a word... order or "depth", e.g., "set key box opaque 1" (default) 3. grid lines 2. plots (covers grid lines) 1. key (covers grid lines and plots) or "set key box opaque 2" 1. grid lines 2. key (covers grid lines) 3. plots (covers grid lines and key) or "set key box opaque 3" (same as "set key box transparent") Thoughts? Dan |