Feature request: availability to change canvas size wile printing with the driver Postscript
Ben Abbott
bpabbott at mac.com
Thu Oct 30 05:57:03 CDT 2008
On Oct 30, 2008, at 6:01 AM, François Poulain wrote:
> 2008/10/27 Ben Abbott <bpabbott at mac.com>:
>> For on screen rendering (or for bitmaps), gnuplot does not explicitly
>> control where its windows are displayed, so "position(1:2)" are moot.
>> However, it is possible to tell gnuplot what the width,
>> "position(3)", and
>> height, "position(4)" are.
>>
>> set term <terminal type> size <XX> <YY>
>
> I am not so sure; it doesn't work on my gnuplot-4.2 :
> gnuplot> set term wxt size 800 600
> Terminal type set to 'x11'
> undefined variable: size
>
> (idem with wxt term)
Strange ... that comes right out of the gnuplot manual and worked fine
for me when I inserted in into the gnuplot stream produced by Octave.
I tried x11 and a couple of bitmaps. When I have time to work on this
I'll post a plot stream for you and others to try out.
>> So, to review, my questions are;
>>
>> (1) How does gnuplot relate character width/height of the margins to
>> points/inches/etc?
>>
>> (2) How does gnuplot determine on screen dpi?
>>
>> (3) How does gnuplot determine the dpi of bitmap output?
>
> I don't know gnuplot, but a fast look in source code told me this is
> hardcoded:
> ~/gnuplot-4.2.2$ grep "dpi\|\ 640" src/* -R -C1
> src/beos/GPBitmap.h-//int gX = 100, gY = 100;
> src/beos/GPBitmap.h://unsigned int gW = 640, gH = 450;
> src/beos/GPBitmap.h-
> --
> src/gplt_x11.c-static int gX = 100, gY = 100;
> src/gplt_x11.c:static unsigned int gW = 640, gH = 450;
> src/gplt_x11.c-static unsigned int gFlags = PSize;
> --
> src/NeXT/GnuView.h- /* This is the coordinate system defined in
> next.trm. */
> src/NeXT/GnuView.h:#define NEXT_XMAX 640
> src/NeXT/GnuView.h-#define NEXT_YMAX 480
> --
> src/term.c-
> src/term.c:/* resolution in dpi for converting pixels to size units */
> src/term.c-int gp_resolution = 72;
> --
> src/wxterminal/wxt_gui.cpp- title.Printf(wxT("Gnuplot (window id :
> %d)"), window.id);
> src/wxterminal/wxt_gui.cpp: window.frame = new wxtFrame( title,
> window.id, 50, 50, 640, 480 );
> src/wxterminal/wxt_gui.cpp- window.frame->Show(true);
>
> François
hmm ... it appears the gnuplot treats points and pixels in the same
way (72dpi). That is simple enough.
Ben
More information about the Bug-octave
mailing list