bugGNU Octave - Bugs: bug #45710, grid minor and axis tight fail to...

 
 

bug #45710: grid minor and axis tight fail to plot all minor grid lines

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Fri 07 Aug 2015 01:09:52 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Godfrey Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Tue 10 Jan 2017 06:15:06 PM UTC, comment #10: 

I pushed the patch here with minor modifications (http://hg.savannah.gnu.org/hgweb/octave/rev/29ea25593dd7).  Thanks for the work on this.

Rik <rik5>
Project Administrator
Tue 10 Jan 2017 11:47:31 AM UTC, comment #9: 

Thank you Rik for reviewing the patch.
The attached one should apply and compile cleanly on a current tip. It also fixes an issue with the previous patch when the ticks are spaced unequally.

(file #39425)

Markus Mützel <mmuetzel>
Project Member
Mon 09 Jan 2017 11:32:50 PM UTC, comment #8: 

@Markus: Could you refresh your patch from July?  It's not applying cleanly against the dev branch.  As for the question in comment #7, no, there isn't a particular shortcut to do concatenation in C++.  The for loops that you are using are pretty standard.  If you were trying for ultimate performance you could use Matrix.fortran_vec () to get a pointer to the underlying array and then use std::memcpy, but that kind of performance probably isn't required here.

Rik <rik5>
Project Administrator
Thu 14 Jul 2016 07:53:06 PM UTC, comment #7: 

Attached, please, find a patch that adds support for minor grid lines outside the major grid range. This only fixes the error for linear plots like the example in comment #1.

I did not find where this was broken since 4.0.0 and I don't know whether this is the right approach to fix it.

Btw. is there a way for concatenating matrices or vectors in C++ instead of using loops? E.g. like doing [A,B] for row vectors in Octave.

(file #37876)

Markus Mützel <mmuetzel>
Project Member
Tue 28 Jun 2016 12:14:20 PM UTC, comment #6: 

Just to note that we should only look at fixing the behavior of the example in comment #1. In comment #4 we actually expect that there is a major grid line along x = 200 and y = 200 (and this is also what happened in 4.0).

Pantxo Diribarne <pantxo>
Project Member
Sun 23 Aug 2015 07:21:28 PM UTC, comment #5: 

Confirmed.  This is a regression from 4.0.0.

Rik <rik5>
Project Administrator
Fri 07 Aug 2015 04:36:01 PM UTC, comment #4: 

One more bit of data: varying the plot
range produces other errors in the plot.
For example:

plot(1.1:1:202)
grid minor
axis tight

produces extraneous lines at the top and right borders.

So, axis tight needs more work, or, in effect, returning
it to how it worked in 4.0.0.

I cannot find where its behavior really gets determined.

Michael Godfrey <godfrey>
Project Member
Fri 07 Aug 2015 04:09:52 PM UTC, comment #3: 

I tried replacing the scripts in:
scripts/plot (and its subfolders) with the
scripts from 4.0.0. This had no effect!
Since there were lots of changes I thought
that something would break, but it did not.

So, the problem is in code that is not in ../scripts/plot

Any ideas?

Michael Godfrey <godfrey>
Project Member
Fri 07 Aug 2015 10:45:41 AM UTC, comment #2: 

The minor grid lines are correct in 4.0.0 release.
See attached badgrid_ok_4-0-0.pdf.

Right now, this is the only fully correct rendering.
So, it is appropriate to consider the current default
system as a regression from 4.0.0 release.

(file #34585)

Michael Godfrey <godfrey>
Project Member
Fri 07 Aug 2015 09:20:25 AM UTC, comment #1: 

Here is a simple example of the problem:

plot(.9:1:198)
grid minor
axis tight

This is better to use for diagnosis than
the complicated plot where I found the problem.

Michael Godfrey <godfrey>
Project Member
Fri 07 Aug 2015 01:09:52 AM UTC, original submission:  

Until recently, use of grid minor and grid tight
produced the plot attached as goodgrid.pdf

Now, this combination produces the attached file badplot.pdf
Which shows that the minor grid lines for the origin
to first major grid line are missing.

If grid tight is not used the plot is correct.

Note that the previous plot was actually not correct either.
Only the xaxis minor grid lines were drawn. I had not
noticed this previously.

I will look at this in more detail when I have a chance.
But, if someone who has made recent changes to the plotting
functions can find what change has caused this it would help.

Michael Godfrey <godfrey>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39425:  bug45710_grid_minor_v2.patch added by mmuetzel (2KiB - application/octet-stream)
file #37876:  grid_minor.patch added by mmuetzel (2KiB - text/x-diff)
file #34585:  badgrid_ok_4-0-0.pdf added by godfrey (5KiB - application/pdf)
file #34583:  goodgrid.pdf added by godfrey (6KiB - application/pdf)
file #34584:  badgrid.pdf added by godfrey (7KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-10 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2017-01-10 mmuetzel Attached File- => Added bug45710_grid_minor_v2.patch, #39425
        StatusConfirmed => Patch Submitted
        Operating SystemGNU/Linux => Any
    2016-07-14 mmuetzel Attached File- => Added grid_minor.patch, #37876
    2015-08-23 rik5 StatusNone => Confirmed
    2015-08-07 godfrey Attached File- => Added badgrid_ok_4-0-0.pdf, #34585
    2015-08-07 godfrey Attached File- => Added goodgrid.pdf, #34583
        Attached File- => Added badgrid.pdf, #34584

    Back to the top


    Powered by Savane 3.5