bugGNU Octave - Bugs: bug #63095, Set HandleVisibility to off and...

 
 

bug #63095: Set HandleVisibility to off and plot bounds are not adjusted for large values then plotted..

Submitter:  Nicky McLean <dinosaur>
Submitted:  Fri 23 Sep 2022 12:41:38 PM UTC
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  dinosaur Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Thu 27 Oct 2022 07:32:38 AM UTC, comment #8: 

Thanks for testing.

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Tue 25 Oct 2022 09:03:17 PM UTC, comment #7: 

I tried it on ubuntu 22.04
octave dev (52ccba0f1af9)

i get
'[0 1]'  '[0 2]'
looks good to me.

Doug Stewart <dastew>
Sat 24 Sep 2022 10:01:31 AM UTC, comment #6: 

I pushed a change here that fixes this use case for me:
https://hg.savannah.gnu.org/hgweb/octave/rev/67cad4e8f866

The change required to no longer automatically switch the "zliminclude" property of text objects. I hope that won't break other use cases.
The test suite still passes and `demo text` still looks good to me.

Marking as ready for test.

Markus Mützel <mmuetzel>
Project Member
Fri 23 Sep 2022 01:49:21 PM UTC, comment #5: 

I'm changing the item group back to incorrect result since it seems to me that is more precise description.  Hiding the handle doesn't change the visibility of the data, does it?  Since it is still visible, it seems correct that it should still be used when computing limits.  My guess is we are incorrectly skipping the objects with hidden handles.

I understand it's a bit of a gray area, but let's please try to limit the use of "Matlab Compatibility" to things where Octave's behavior is reasonable but different.

John W. Eaton <jwe>
Project Administrator
Fri 23 Sep 2022 01:12:59 PM UTC, comment #4: 

oops. That should have read:

> The axis limits change with the second line if 'handlevisibility' isn't set to 'off'.

Markus Mützel <mmuetzel>
Project Member
Fri 23 Sep 2022 01:12:22 PM UTC, comment #3: 

Confirmed in Octave 7.2.0 and a recent tip from the development branch.

Simpler steps to reproduce:

figure()
plot([0 1])
ylim()
hold on
plot([2 0], 'handlevisibility', 'off')
ylim()

This returns `[0 1]` for both `ylim()` commands. In Matlab R2022a, it returns `[0 2]` for the second `ylim()` command.

The axis limits change with the second line if 'handlevisibility' isn't set to 'on'.

It looks like currently lines with 'handlevisibility' set to 'off' aren't taken into account when calculating the axis limits. In Matlab, they are.
Maybe this is something that has changed in Matlab at some point in the past with no one noticing so far?

Markus Mützel <mmuetzel>
Project Member
Fri 23 Sep 2022 01:09:14 PM UTC, comment #2: 

Can also reproduce on current development branch.

GNU Octave Version: 8.0.0 (hg id: e3016248ca5d)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 23 Sep 2022 01:01:23 PM UTC, comment #1: 

I can reproduce this on octave 7.2 on linux

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 23 Sep 2022 12:41:38 PM UTC, original submission:  

   The objective if to produce a complex plot, with decorations. Using half-hourly electricity data, the plan is to plot a line joining daily averages, and, for each day a vertical line from the day's maximum to its upper quartile, and also from its lower quartile to the minimum - each sequence in different colours. Thus there will be two bands of vertical bars, with a joined line for the daily averages in between.
   In the case of more than one data series to be plotted on the same figure, a legend is needed. So that the legend association is not distracted by the decorations, the averages are plotted as normal, but the decorations are plotted with "HandleVisibility" "off". Thus for two data series there would be six plot commands (three for each series: the averages, and the upper and lower bars) but there are only two legend entries.
   But the top of the plot is missing. That is, the upper bound of the plot is that of the highest value of the daily averages and the higher values of the upper band (daily max. to upper quartile) are outside the range shown. By supplying the maximum value of the data to the ylim command, the upper band is recovered and all appears.
   This behaviour applies for the windows version of Octave (currently 4.4.0; updating is on hold during this test) and also the more recent GNU/Linux version (dual boot system). But with Matlab (on windows), the original site for the development of the command file, this was not a problem and there is no need for ylim.
   The attached file shows a simple demonstration, producing one figure with and one without the use of ylim, in which case the top is missing. If HandleVisibility is left "on", both plots come out properly, and without ylim being specified, the upper bound is that of the data plotted.
   In short, Octave's plotting differs from Matlab's...

Nicky McLean <dinosaur>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53746:  Trim.m added by dinosaur (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by dinosaur (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 project members can vote.

     

     

     

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-27 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-09-24 mmuetzel StatusConfirmed Ready For Test
    2022-09-23 jwe Item GroupMatlab Compatibility Incorrect Result
    2022-09-23 mmuetzel Item GroupInaccurate Result Matlab Compatibility
        StatusNone Confirmed
        Releaseother dev
        Operating SystemMicrosoft Windows Any
    2022-09-23 dinosaur Attached File- Added Trim.m, #53746

    Back to the top


    Powered by Savane 3.9