bugGNU Octave - Bugs: bug #56302, axis tight buggy

 
 

bug #56302: axis tight buggy

Submitter:  Z. M. <zmarantz>
Submitted:  Fri 10 May 2019 04:46:43 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Z. M. Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 13 May 2019 02:53:16 PM UTC, comment #3: 

Thanks!

Z. M. <zmarantz>
Fri 10 May 2019 09:24:54 PM UTC, comment #2: 

This is a duplicate of bug #32980.  The issue is that the OpenGL backend represents values using single precision variables.  The different in time values you have are less than machine precision for singles (eps ('single')).

The straightforward workaround for now is to re-scale your time values in to something representable with single precision values.  See the following.


load axisTightData.mat
t_scaled = t / max (t(:));
plot (t_scaled, vout);
axis tight
labels = {"0", "2e-9", "4e-9", "6e-9", "8e-9", "1e-8"};
set (gca, 'xticklabel', labels)


This will get fixed at some point, but it is a deep change to Octave's code base to workaround the behavior of the OpenGL API.

Rik <rik5>
Group administrator
Fri 10 May 2019 04:56:22 PM UTC, comment #1: 

And for the record, using


xlim([min(t) max(t)])


doesn't solve the issue either.

Z. M. <zmarantz>
Fri 10 May 2019 04:46:43 PM UTC, original submission:  

Hi Maintainers,

I'm having an issue with the axis("tight") function. Only the y-axis gets contained to the value limits, while the x-axis is actually extended.

I've included the data variables used to plot it and the resulting output image.

The code is:

h=plot(t,vout);
axis("tight");
saveas(h,'axisTightBug','jpg')


Thanks,
Z. M.

Z. M. <zmarantz>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46893:  axisTightData.mat added by zmarantz (43KiB - application/octet-stream)
file #46894:  axisTightBug.jpg added by zmarantz (41KiB - image/jpeg)

 

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 zmarantz (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-10 rik5 StatusNone Duplicate
        Open/ClosedOpen Closed
        Operating SystemMac OS Any
    2019-05-10 zmarantz Attached File- Added axisTightData.mat, #46893
        Attached File- Added axisTightBug.jpg, #46894

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code