From: <jc...@fe...> - 2002-11-05 20:21:09
|
Hi, I have a recurrent problem with plenv() that I would like to discuss. For start, plenv() is so handy that I always use it whenever possible. But with multiplots (sub-windows or whatever -- set with plssub()), I=20 always have a problem: plenv() always advance the page, which is not=20 desirable. For interactive languages, one might wish to keep making=20 plots in the same sub-window until satisfied, and then advance to the=20 next or any other sub-window. This is not possible to do with plenv(),=20 as it always advance the page, which in multi-plot mode means another=20 sub-window. A possible cure would be to do a pladv(desired_page -1) followed by =20 plenv(), but this fails if one desires to plot in sub-window 1, as=20 pladv(0) has a different behavior, issuing a pleop/plbop sequence. So I always end up having a private copy of plenv() with the following=20 modifications: if ( plsc->nsubx * plsc->nsuby !=3D 1) { /* multiplot, erase current subwindow, plclear() does not work!*/ /* don't advance page! */ plvpor(0,1,0,1) plwind(0,1,0,1) plcol(0);plpsty(0) plfill(4, x_rect, y_rect); /* fill sub-window with background color=20 */ } else pladv(0) =20 CVS committing something like this would break code compatibility, as=20 users that depend on plenv() in multiplot mode would need to issue a=20 pladv(0) before. What do you think of this problem? Is there a "cure" that does not=20 influence other users? Thanks, Joao |