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

 
 

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

Submitted by:  Dave Goel <deego>
Submitted on:  Mon 12 Jun 2017 09:48:45 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Wont FixAssigned to: None
Originator Name: Dave GoelOpen/Closed: Closed
Release: 4.0.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project Administrator
Thu 15 Jun 2017 04:37:46 PM UTC, comment #4:

Mike,

Understood. Thanks a lot.

Dave Goel <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>
Project Administrator
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.

Dave Goel <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.

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>
Project Administrator
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]

Dave Goel <deego>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 15 Jun 2017 11:15:00 PM UTCrik5StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Mon 12 Jun 2017 09:48:45 PM UTCdeegoCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1