Dear plplot maintainers, I need to make big sized postscript plots with many details, and it is not satisfactory just to zoom a small plot because many features (line width, font sizes, etc.) have a default absolute size and look bad when zoomed. On the other side I noticed that the ps driver has an hardcoded physical page size (XSIZE, YSIZE in ps.h) which cannot be changed by the user, as far as I know. If this is true, then I propose a patch which could give the chance to change the postscript page size with plspag through a combination of the (xp,xleng) and (yp,yleng) parameters, currently unused for ps, so that the page size in postscript points would be xleng*xp/72,yleng*yp/72. The patch leaves the default behavior unchanged and does not change the API, so I think its implementation would not break any existing application and would have also the positive side effect to set xleng and yleng for postscript (I remember the "Undistorted circles" thread where these values were used to get the physical aspect ratio, see http://www.mail-archive.com/[EMAIL PROTECTED]/msg00424.html ). If you think there is something wrong, or the same result could be achieved in a different way, please do it as you feel correct, but I would really be interested to see such a feature in a future version of plplot. The patch applies to ps and psttf drivers, maybe other drivers could benefit from such an approach? I inline the patch since it is quite simple:
--- plplot-5.9.0/include/ps.h~ 2007-11-18 21:04:07.000000000 +0100 +++ plplot-5.9.0/include/ps.h 2008-12-02 12:29:02.000000000 +0100 @@ -10,8 +10,8 @@ #define LINELENGTH 78 #define COPIES 1 -#define XSIZE 540 /* 7.5 x 10 [inches] */ -#define YSIZE 720 /* (72 points = 1 inch) */ +#define XSIZE (int) (pls->xlength*(pls->xdpi/72.)) +#define YSIZE (int) (pls->ylength*(pls->ydpi/72.)) #define ENLARGE 5 #define XPSSIZE ENLARGE*XSIZE #define YPSSIZE ENLARGE*YSIZE --- plplot-5.9.0/drivers/ps.c~ 2007-11-18 21:04:11.000000000 +0100 +++ plplot-5.9.0/drivers/ps.c 2008-12-02 13:21:14.000000000 +0100 @@ -156,6 +156,14 @@ { PSDev *dev; +/* Set default values */ + if (pls->xlength <= 0 || pls->ylength <=0) { + pls->xlength = 540; + pls->ylength = 720; + } + if (pls->xdpi <= 0) pls->xdpi = 72.; + if (pls->ydpi <= 0) pls->ydpi = 72.; + PLFLT pxlx = YPSSIZE/LPAGE_X; PLFLT pxly = XPSSIZE/LPAGE_Y; --- plplot-5.9.0/drivers/psttf.cc~ 2007-11-18 21:04:10.000000000 +0100 +++ plplot-5.9.0/drivers/psttf.cc 2008-12-02 13:20:59.000000000 +0100 @@ -195,6 +195,14 @@ PSDev *dev; PostscriptDocument *doc; +/* Set default values */ + if (pls->xlength <= 0 || pls->ylength <=0) { + pls->xlength = 540; + pls->ylength = 720; + } + if (pls->xdpi <= 0) pls->xdpi = 72.; + if (pls->ydpi <= 0) pls->ydpi = 72.; + PLFLT pxlx = YPSSIZE/LPAGE_X; PLFLT pxly = XPSSIZE/LPAGE_Y; thank you and best regards, Davide -- ============================= Davide Cesari ============================ Servizio IdroMeteorologico ARPA Emilia Romagna Area Modellistica Numerica e Radarmeteorologia Phone/Fax: +39 051525926/+39 0516497501 E-mail: [EMAIL PROTECTED] Home page: http://www.webalice.it/o.drofa/davide/ Address: ARPA-SIM, Viale Silvani 6, 40122 Bologna, Italy ======================================================================== ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel