bugGNU Octave - Bugs: bug #52376, some minor gridlines not displayed...

 
 

bug #52376: some minor gridlines not displayed on log scale axes

Submitter:  Muhali <muhali>
Submitted:  Thu 09 Nov 2017 05:56:15 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 15 Nov 2017 10:04:13 AM UTC, comment #8: 

I see the following error in Matlab R2016a:

semilogy(0.1:0.1:7)
set(gca, 'ytick', [10 3 1 0.3 0.1], 'ylim', [0.02 17], 'yminorgrid', 'on')
Error using matlab.graphics.axis.Axes/set
While setting the 'YTick' property of 'Axes':
Value must be a vector of type single or double whose values increase


I will open a separate bug report.

Markus Mützel <mmuetzel>
Group administrator
Tue 14 Nov 2017 10:19:51 PM UTC, comment #7: 

Rik, thank you for reviewing and pushing. I realized now (i.e. too late) that the logic fails if the manual ticks are provided in non-ascending order, e.g.:

semilogy(0.1:0.1:7)
set(gca, 'ytick', [10 3 1 0.3 0.1], 'ylim', [0.02 17], 'yminorgrid', 'on')


Is that correct syntax, or should it fail? I'll try and test tomorrow what Matlab does.

Markus Mützel <mmuetzel>
Group administrator
Mon 13 Nov 2017 04:39:05 PM UTC, comment #6: 

Nice work.  I checked the cset in here http://hg.savannah.gnu.org/hgweb/octave/rev/0da1bdfbfacb.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Sat 11 Nov 2017 07:12:40 PM UTC, comment #5: 

The attached patch should fix the issue with the missing minor grid lines outside the range of major ticks on logarithmic axes.
I also removed the FIXME because I think logarithmic ticks and lims are handled correctly now.
Another test I used for manual ticks:

semilogy(0.1:0.1:7)
set(gca, 'ytick', [0.1 0.3 1 3 10], 'ylim', [0.02 7], 'yminorgrid', 'on')


(file #42369)

Markus Mützel <mmuetzel>
Group administrator
Fri 10 Nov 2017 01:12:51 PM UTC, comment #4: 

you are right of course.

Muhali <muhali>
Fri 10 Nov 2017 11:25:50 AM UTC, comment #3: 

For me, the y-axis limits are as requested in Matlab R2016a. I cannot see y=10. However, the minor grid lines at 2,3,4,5,6 are drawn by Matlab. Those are omitted by Octave.

I'll try to have a look at this during the weekend.

Markus Mützel <mmuetzel>
Group administrator
Fri 10 Nov 2017 10:48:27 AM UTC, comment #2: 

Matlab shows all gridlines up to y=10.

Muhali <muhali>
Fri 10 Nov 2017 02:02:32 AM UTC, comment #1: 

What does Matlab do for this code?

I re-titled the report to reflect the exact issue.  There was a similar report about linear scale axes at bug #45710.  I'm adding Markus to the CC list since he fixed the previous bug and might know exactly the solution for this one as well.

Rik <rik5>
Group administrator
Thu 09 Nov 2017 05:56:15 PM UTC, original submission:  

In this example


semilogy(0.1:0.1:7)
set(gca, 'ylim', [0.1 7], 'yminorgrid', 'on')


all gridlines above 1 are missing.

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42369:  bug52376_log_grid_minor.patch added by mmuetzel (4KiB - 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 mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by muhali (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-13 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2017-11-11 mmuetzel Attached File- Added bug52376_log_grid_minor.patch, #42369
        StatusNone Patch Submitted
        Operating SystemGNU/Linux Any
    2017-11-10 rik5 Summaryhalf of gridlines missing some minor gridlines not displayed on log scale axes
        Carbon-Copy- Added mmuetzel

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code