bugGNU Octave - Bugs: bug #51229, ylim() fails to read correct...

 
 

bug #51229: ylim() fails to read correct limits:

Submitter:  deego <deego>
Submitted:  Mon 12 Jun 2017 09:48:45 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Dave Goel Open/Closed:  * Closed
Release:  * 4.0.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Jun 2017 11:15:01 PM UTC, comment #5: 

Marking as "Wont Fix" since this limitation is intrinsic to gnuplot.  Closing report.

Rik <rik5>
Group administrator
Thu 15 Jun 2017 04:37:46 PM UTC, comment #4: 

Mike,

Understood. Thanks a lot.

deego <deego>
Thu 15 Jun 2017 06:20:57 AM UTC, comment #3: 

Yeah, I mean either fltk or qt. The fltk toolkit has the disadvantage that it is on the same execution thread as the interpreter, so if you block the interpreter, you can't interact with a figure, as you've seen.

The qt toolkit runs on a separate thread from the interpreter, so you can interact with the plot, but there are some other open bug reports about race conditions and other thread interaction problems. Your script works perfectly for me with the qt toolkit.

My main point is I don't think the gnuplot toolkit will ever do what you're looking for here. Octave tells gnuplot how to draw something, but if the user changes it in the gnpulot window, Octave has no awareness of that.

Mike Miller <mtmiller>
Group Member
Wed 14 Jun 2017 09:34:20 PM UTC, comment #2: 

Mike,

Thanks. What's a native plot interface?  On my octave, I see only fltk and gnuplot, with the former being the default. Is fltk the native interface?

With fltk, the user can't even see the figure until much later when octave returns to the prompt, like my bugreport explained.

deego <deego>
Wed 14 Jun 2017 08:38:31 PM UTC, comment #1: 

My understanding of the interface between Octave and gnuplot has been that it is always one-way. Any mouse interaction of the axis limits or zoom level doesn't get reflected back to Octave.

I see the same thing whether it's done interactively or in a script, doesn't matter, in the current version or going back to 3.6.4 with gnuplot 4.4.


graphics_toolkit gnuplot
plot (1:2)
## zoom on the plot with the mouse
ylim ## still returns [1 2]


I think this is just the way it works, use one of the native plot interfaces if you want a real two-way interaction of the plot state with either commands or the mouse.

Mike Miller <mtmiller>
Group Member
Mon 12 Jun 2017 09:48:45 PM UTC, original submission:  


octave:2> version
ans = 4.0.3 ## from debian backports on debian stable.


Create a file testmy.m with the  contents below, and run them. During the sleep() phase, zoom in the figure. Our program tries to respect the user's zoom preference for further plots, so it tries to read the new ylimits, but fails.

Also note that we have to use gnuplot for this. With fltk, we can't even see the plot during the sleep().

If you execute these steps one-by-one on commandline instead, the bug won't show.




testmy.m:



graphics_toolkit("gnuplot"); ## using the default fltk, user can't even see the plot during the sleep phase.

x = y = [1 2];

plot(x,y);

disp("Sleeping 10s. Go ahead and move ylims around on the figure! I will not be able to read them upon waking up from sleep()!");

sleep(10);

drawnow(); ## Hoping this will help, but it doesn't.
refresh(); ## Hoping this will help, but it doesn't.

ylimnew = ylim()

## we obtain [1 2]


deego <deego>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-15 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed
    2017-06-12 deego Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code