bugGNU Octave - Bugs: bug #49103, gnuplot: set (gcf,...

 
 

bug #49103: gnuplot: set (gcf, "position", ...) not supported in __gnuplot_drawnow__.m

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Fri 16 Sep 2016 03:08:06 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Tatsuro MATSUOKA Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 16 Sep 2016 07:45:54 PM UTC, comment #4: 

Re-opening and re-titling report.

It seems that gnuplot allows the syntax, but Octave doesn't generate it.

I set a breakpoint in _gnuplot_drawnow_.m and it is triggered by


set (hf, "position", [300 300, 100 100])


This is good.  It appears that in gnuplot_set_term we aren't executing the part that changes the size and position.  That code is protected by


172:      if (! (any (strfind (opts_str, " size ") > 0)
173:          || any (strfind (opts_str, "size ") == 1)))



Rik <rik5>
Group administrator
Fri 16 Sep 2016 07:27:57 PM UTC, comment #3: 

If I do in gnuplot:

gnuplot> set term qt
Terminal type set to 'qt'
Options are '0 font "Sans,9"'
gnuplot> set term qt position 100,100
Terminal type set to 'qt'
Options are '0 position 100, 100 font "Sans,9"'
gnuplot> plot sin(x)
gnuplot> set term qt position 500,100
Terminal type set to 'qt'
Options are '0 position 500, 100 font "Sans,9"'
gnuplot> plot sin(x)

the second plot shifts to a new position.

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Fri 16 Sep 2016 05:52:50 PM UTC, comment #2: 

Setting the position property on an already open figure doesn't seem to work on the x11 terminal either. I doubt this was ever expected to work.

Mike Miller <mtmiller>
Group Member
Fri 16 Sep 2016 04:18:10 PM UTC, comment #1: 

I pushed your patch.

Code like this now works


./run-octave -f --no-gui-libs
setenv ("GNUTERM", "wxt");
graphics_toolkit gnuplot
hf = figure ("position", [50, 50, 200 100])


However, once the figure is created I can't change the position.


set (hf, "position", [300 300, 100 100])


I don't know whether that is a limitation of gnuplot, or a limitation within _gnuplot_drawnow_.  Perhaps that should be reported as a new bug.

Rik <rik5>
Group administrator
Fri 16 Sep 2016 03:08:06 AM UTC, original submission:  

The topic originate from
http://octave.1599824.n4.nabble.com/Minimum-gnuplot-version-for-Octave-4-2-td4679761.html#a4679776

I have made a trial patch to support figure position property for wxt and qt terminal.

The position option for both terminal supported from gnuplot 5.
(Sorry for my mistaken in the original thread.)

I add "wxt_figure_position" and "qt_figure_position" for gnuplot 5 or later into _gnuplot_drawnow_.m.

Tatsuro MATSUOKA <tmacchant>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tmacchant (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-17 mtmiller Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Release4.2.0-rc1 dev
    2016-09-16 rik5 StatusFixed Confirmed
        Open/ClosedClosed Open
        Summaryfigure position property support for qt and wxt terminal on gnuplot_graphics toolkit gnuplot: set (gcf, "position", ...) not supported in _gnuplot_drawnow_.m
    2016-09-16 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2016-09-16 tmacchant Attached File- Added figure_position_qt_wxt.patch, #38521

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code