|
From: Benjamin L. <lin...@gm...> - 2010-02-07 19:07:05
Attachments:
gp_add-size-to-win-term.patch
|
Hello, I'd like to propose the addition of a 'size' and 'position' option to the windows terminal. This would fit very nicely in the possibility to position the plotting figure from octave on screen when using the gnuplot plotting backend. I attached a patch which accomplishes it. Comments? benjamin |
|
From: Tatsuro M. <tma...@ya...> - 2010-02-08 02:37:04
Attachments:
sizeposition.png
|
Hello Thank you for your efforts. It will be quite nice!! the windows terminal has the options of size and position. I have applied your patch and upload binary on the web. http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ sizedefines the width and height of the window in pixel and positionthe origin of the window i.e.the position of the top left corner on the screen (again in pixel).Both these options override the default settings from the WGNUPLOT.INI file (see below). gnuplot> set term win size 1024, 768 position 200, 200 Terminal type set to 'windows' Options are 'color noenhanced font "Arial, 10"' gnuplot> plot sin(x) However size are small compared to that expected (t) and position option was not changed. Regards Tatsuro --- Benjamin Lindner wrote: > Hello, > > I'd like to propose the addition of a 'size' and 'position' option > to the windows terminal. > This would fit very nicely in the possibility to position the > plotting figure from octave on screen when using the gnuplot plotting > backend. > > I attached a patch which accomplishes it. > Comments? > > benjamin > > add size option to windows terminal > > diff --git a/term/win.trm b/term/win.trm > --- a/term/win.trm > +++ b/term/win.trm > @@ -125,7 +125,8 @@ > /* Interface routines - create list of actions for Windows */ > > enum WIN_id { WIN_DEFAULT, WIN_MONOCHROME, WIN_COLOR, WIN_GTITLE, > - WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_OTHER }; > + WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE, > + WIN_POSITION, WIN_OTHER }; > > static struct gen_table WIN_opts[] = > { > @@ -137,6 +138,8 @@ > { "enh$anced", WIN_ENHANCED }, > { "font", WIN_FONT }, > { "ti$tle", WIN_GTITLE }, > + { "siz$e", WIN_SIZE }, > + { "pos$ition", WIN_SIZE }, > { NULL, WIN_OTHER } > }; > > @@ -196,6 +199,42 @@ > term->flags |= TERM_MONOCHROME; > c_token++; > break; > + case WIN_SIZE: > + { > + c_token++; > + int win_width = 0; > + int win_height = 0; > + if (END_OF_COMMAND) > + int_error(c_token,"size requires 'width,heigth'"); > + win_width = real_expression(); > + if (!equals(c_token++,",")) > + int_error(c_token,"size requires 'width,heigth'"); > + win_height = real_expression(); > + if (win_width < 1 || win_height < 1) > + int_error(c_token, "size is out of range"); > + > + graphwin.Size.x = win_width; > + graphwin.Size.y = win_height + graphwin.statuslineheight; > + break; > + } > + case WIN_POSITION: > + { > + c_token++; > + int win_x = 0; > + int win_y = 0; > + if (END_OF_COMMAND) > + int_error(c_token,"position requires 'x,y'"); > + win_x = real_expression(); > + if (!equals(c_token++,",")) > + int_error(c_token,"position requires 'x,y'"); > + win_y = real_expression(); > + if (win_x < 1 || win_y < 1) > + int_error(c_token, "position is out of range"); > + > + graphwin.Origin.x = win_x; > + graphwin.Origin.y = win_y; > + break; > + } > case WIN_COLOR: > graphwin.color = TRUE; > term->flags &= ~TERM_MONOCHROME; > @@ -949,12 +988,18 @@ > " {enhanced | noenhanced}", > " {{font} \"fontname{,fontsize}\" {<fontsize>}}", > " {title \"Plot Window Title\"}", > +" {size <width>,<height>}", > +" {position <x>,<y>}", > "", > " where `color` and `monochrome` select colored or mono output,", > " `enhanced` enables enhanced text mode features (subscripts,", > " superscripts and mixed fonts). See `enhanced` for more information.", > " `\"<fontname>\"` is the name of a valid Windows font, and `<fontsize>`", > " is the size of the font in points.", > +" `size` defines the width and height of the window in pixel and `position`", > +" the origin of the window i.e. the position of the top left corner on the", > +" screen (again in pixel). Both these options override the default settings", > +" from the WGNUPLOT.INI file (see below).", > "", > " Other options may be set with the graph-menu or the initialization file.", > "", > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com> _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |
|
From: Benjamin L. <lin...@gm...> - 2010-02-08 08:09:35
Attachments:
gp_add-size-to-win-term.patch
|
> gnuplot> set term win size 1024, 768 position 200, 200 > Terminal type set to 'windows' > Options are 'color noenhanced font "Arial, 10"' > gnuplot> plot sin(x) > > However size are small compared to that expected (t) and position option > was not changed. Oops, my mistake. and a very stupid one. Second try, again patch is attached. One thing I am not sure about is, what is to be called the 'size' of the graph window. Is it the total extension of the window on screen? Or is it the extension of the actual plotting canvas? The first currently also contains the status bar and it might possibly contain a menu bar or icon toolbars (like the wxt term). If I copy the graph window to the clipboard, then I don't get the full window as displayed on screen but only the plotting canvas. So the size of the copied plot differs from the size of the window shown on screen. I tend to view the 'size' as the extension of the canvas, but I'm not convinced everybody else does... comments? benjamin -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser |
|
From: Petr M. <mi...@ph...> - 2010-02-08 08:52:41
|
> One thing I am not sure about is, what is to be called the 'size' > of the graph window. > Is it the total extension of the window on screen? > Or is it the extension of the actual plotting canvas? > > I tend to view the 'size' as the extension of the canvas, but > I'm not convinced everybody else does... Yes, it should be the canvas size. I have tried the patch gp_add-size-to-win-term.patch on Linux/Wine but it does not work for me. It takes position from wgnuplot.ini or the default one. --- PM |
|
From: Tatsuro M. <tma...@ya...> - 2010-02-08 11:13:01
|
Hello I have tried a new patch. In my case (Msys+mingw on win xp), size and position seem to work correct with the new patch. Very nice!!! Regards Tatsuro --- Petr Mikulik wrote: > > One thing I am not sure about is, what is to be called the 'size' > > of the graph window. > > Is it the total extension of the window on screen? > > Or is it the extension of the actual plotting canvas? > > > > I tend to view the 'size' as the extension of the canvas, but > > I'm not convinced everybody else does... > > Yes, it should be the canvas size. > > I have tried the patch gp_add-size-to-win-term.patch on Linux/Wine but > it does not work for me. It takes position from wgnuplot.ini or the default > one. > > --- > PM > > -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |
|
From: Petr M. <mi...@ph...> - 2010-02-08 14:18:38
|
> I have tried a new patch. > > In my case (Msys+mingw on win xp), size and position seem to work correct with the new patch. I tried again, and "set term win pos ... size ..." works for patched gnuplot-cvs but not for gnuplot 44rc1 even though the patch applies correctly. Can you try it? Petr > > > One thing I am not sure about is, what is to be called the 'size' > > > of the graph window. > > > Is it the total extension of the window on screen? > > > Or is it the extension of the actual plotting canvas? > > > > > > I tend to view the 'size' as the extension of the canvas, but > > > I'm not convinced everybody else does... > > > > Yes, it should be the canvas size. > > > > I have tried the patch gp_add-size-to-win-term.patch on Linux/Wine but > > it does not work for me. It takes position from wgnuplot.ini or the default > > one. > > > > --- > > PM |
|
From: Tatsuro M. <tma...@ya...> - 2010-02-08 23:59:50
|
Hello --- Petr Mikulik wrote: > I tried again, and "set term win pos ... size ..." works for patched > gnuplot-cvs but not for gnuplot 44rc1 even though the patch applies > correctly. Can you try it? I have built gnuplot.exe for windows from 4.4rc-1 source with the patch of Add 'size' and 'position' to windows terminal options. For 4.4rc-1, I have confirmed that the same behavior occurs as Petr reported. The position and size of graph window follow indicated in wignuplot.ini even though I set size and position option. Regards Tatsuro > > I have tried a new patch. > > > > In my case (Msys+mingw on win xp), size and position seem to work correct with the new patch. > > > Petr > > > > > One thing I am not sure about is, what is to be called the 'size' > > > > of the graph window. > > > > Is it the total extension of the window on screen? > > > > Or is it the extension of the actual plotting canvas? > > > > > > > > I tend to view the 'size' as the extension of the canvas, but > > > > I'm not convinced everybody else does... > > > > > > Yes, it should be the canvas size. > > > > > > I have tried the patch gp_add-size-to-win-term.patch on Linux/Wine but > > > it does not work for me. It takes position from wgnuplot.ini or the default > > > one. > > > > > > --- > > > PM > -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |
|
From: Ethan M. <merritt@u.washington.edu> - 2010-02-09 00:54:55
|
On Monday 08 February 2010 15:59:41 Tatsuro MATSUOKA wrote: > Hello > > --- Petr Mikulik wrote: > > I tried again, and "set term win pos ... size ..." works for patched > > gnuplot-cvs but not for gnuplot 44rc1 even though the patch applies > > correctly. Can you try it? > > > I have built gnuplot.exe for windows from 4.4rc-1 source with the patch of Add 'size' and 'position' > to windows terminal options. > > For 4.4rc-1, I have confirmed that the same behavior occurs as Petr reported. The only patch I see in the ChangeLogs that might explain this is the one from Shige Takeno applied to 4.5 CVS 30-Dec-2009. I have now applied that same patch to the 4.4 CVS source as well. Please see if that fixes the problem. Ethan > > The position and size of graph window follow indicated in wignuplot.ini even though I set size and > position option. > > Regards > > Tatsuro > > > > > I have tried a new patch. > > > > > > In my case (Msys+mingw on win xp), size and position seem to work correct with the new patch. > > > > > > Petr > > > > > > > One thing I am not sure about is, what is to be called the 'size' > > > > > of the graph window. > > > > > Is it the total extension of the window on screen? > > > > > Or is it the extension of the actual plotting canvas? > > > > > > > > > > I tend to view the 'size' as the extension of the canvas, but > > > > > I'm not convinced everybody else does... > > > > > > > > Yes, it should be the canvas size. > > > > > > > > I have tried the patch gp_add-size-to-win-term.patch on Linux/Wine but > > > > it does not work for me. It takes position from wgnuplot.ini or the default > > > > one. > > > > > > > > --- > > > > PM > > > > > -------------------------------------- > VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] > http://pr.mail.yahoo.co.jp/olympic/ > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |
|
From: Tatsuro M. <tma...@ya...> - 2010-02-09 02:27:11
|
Hello --- Ethan Merritt wrote: > The only patch I see in the ChangeLogs that might explain this is the one from > Shige Takeno applied to 4.5 CVS 30-Dec-2009. I have now applied that same patch > to the 4.4 CVS source as well. Please see if that fixes the problem. > > Ethan I have attached the patch by Shige Takeno applied to 4.5 CVS 30-Dec-2009 is applied. http://sourceforge.net/tracker/?func=detail&aid=2918370&group_id=2055&atid=302055 After that I attached the Benjamin's patches. The 'size' and 'position' to windows terminal options worked correctly. BTW, how can I access the 4.4 CVS source? I do not know the address. So I have tried $ export CVSROOT=:pserver:ano...@gn...:/cvsroot/gnuplot-4.4 $ cvs login Logging in to :pserver:ano...@gn...:2401/cvsroot/gnuplot-4.4 CVS password: cvs login: authorization failed: server gnuplot.cvs.sourceforge.net rejected access to /cvsroot/gnuplot-4.4 for user anonymous Any suggestions? Regards Tatsuro -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |
|
From: Ethan M. <merritt@u.washington.edu> - 2010-02-09 02:44:27
|
On Monday 08 February 2010, Tatsuro MATSUOKA wrote: > Hello > > --- Ethan Merritt wrote: > > > The only patch I see in the ChangeLogs that might explain this is the one from > > Shige Takeno applied to 4.5 CVS 30-Dec-2009. I have now applied that same patch > > to the 4.4 CVS source as well. Please see if that fixes the problem. > > > > Ethan > > I have attached the patch by Shige Takeno applied to 4.5 CVS 30-Dec-2009 is applied. > http://sourceforge.net/tracker/?func=detail&aid=2918370&group_id=2055&atid=302055 > > After that I attached the Benjamin's patches. > The 'size' and 'position' to windows terminal options worked correctly. > > > BTW, how can I access the 4.4 CVS source? Same root repository, but a special branch label CVSROOT=:pserver:ano...@gn...:/cvsroot/gnuplot cvs login cvs co -r branch-4-4-stable gnuplot Ethan > I do not know the address. So I have tried > > $ export CVSROOT=:pserver:ano...@gn...:/cvsroot/gnuplot-4.4 > $ cvs login > Logging in to :pserver:ano...@gn...:2401/cvsroot/gnuplot-4.4 > CVS password: > cvs login: authorization failed: server gnuplot.cvs.sourceforge.net rejected access to > /cvsroot/gnuplot-4.4 for user anonymous > > Any suggestions? > > Regards > > Tatsuro > > -------------------------------------- > VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] > http://pr.mail.yahoo.co.jp/olympic/ > |
|
From: Tatsuro M. <tma...@ya...> - 2010-02-10 04:40:44
|
Hello --- Ethan Merritt wrote: > > --- Ethan Merritt wrote: > > > > > The only patch I see in the ChangeLogs that might explain this is the one from > > > Shige Takeno applied to 4.5 CVS 30-Dec-2009. I have now applied that same patch > > > to the 4.4 CVS source as well. Please see if that fixes the problem. > > > > > > Ethan > > > > I have attached the patch by Shige Takeno applied to 4.5 CVS 30-Dec-2009 is applied. > > http://sourceforge.net/tracker/?func=detail&aid=2918370&group_id=2055&atid=302055 > > > > After that I attached the Benjamin's patches. > > The 'size' and 'position' to windows terminal options worked correctly. > > > > > > BTW, how can I access the 4.4 CVS source? > > Same root repository, but a special branch label > > CVSROOT=:pserver:ano...@gn...:/cvsroot/gnuplot > cvs login > cvs co -r branch-4-4-stable gnuplot I have been able to access the branch-4-4-stable cvs source and test the Benjamin's patches. It worked fine as you indicated. Thanks!! Tatsuro -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |