bugGNU Octave - Bugs: bug #38914, Gnuplot axis reverse is not...

 
 

bug #38914: Gnuplot axis reverse is not working with gnuplot 5

Submitter:  Dan Sebald <sebald>
Submitted:  Tue 07 May 2013 12:20:05 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
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 24 Jun 2015 09:08:14 PM UTC, comment #17: 

I committed the original change which eliminates the use of the "reverse" keyword and just flips the axis limits (http://hg.savannah.gnu.org/hgweb/octave/rev/977853866d69).  This is the patch from Dan in comment #10.  Closing report.

Rik <rik5>
Group administrator
Tue 23 Jun 2015 04:39:11 PM UTC, comment #16: 

I think the dashed line for gnuplot 5.0 should be a separate bug report.  There is also a related changeset for the "surf" function in which I made the line color/thickness/dash operable in 5.0+ using a has-feature "dashtype":

https://savannah.gnu.org/bugs/?34523

Perhaps all the uses of has-feature "term option dashed" could be replaced by has-feature "dashtype".

Dan Sebald <sebald>
Tue 23 Jun 2015 10:26:58 AM UTC, comment #15: 

Sorry here is not proper place to write new dash/dotted feature of gnuplot 5.0. I will transfer the previous writing somewhere else in maintainers ML.

Tatsuro MATSUOKA <tmacchant>
Tue 23 Jun 2015 09:53:27 AM UTC, comment #14: 

NOTES for ver. 5
The dot/dash pattern of a line can now be controlled independently from other line properties using the keyword "dashtype".

terminal option dasded is deprecate on Ver. 5.

I have a quick look at _gnuplot_drawnow_.m of ver. 4.0.0.

has_termoption_dashed does not have mean on gnuplot 5.0.

If one want support dash and dotted type on gnuplot ver. 5, the routine should be changed entirely.

Tatsuro MATSUOKA <tmacchant>
Tue 23 Jun 2015 07:35:00 AM UTC, comment #13: 

From  gnuplot 5.0 NOTES,

 The "reverse" keyword (e.g. "set xrange [*:*] reverse") now affects only autoscaling. It has no effect on explicit ranges. "set xrange [0:1] reverse" is not the same as "set xrange [1:0]".

Tatsuro MATSUOKA <tmacchant>
Tue 23 Jun 2015 07:10:06 AM UTC, comment #12: 

gnuplot 4.7

For gnuplot,
if the minor version number in odd (1, 3, 5, 7, 9), the version is development branch. The gnuplot 4.7 exist before ver 5. release but it deprecated.

The last version gnuplot 4 is the 4.6.7.
http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.7/
It is a bug fix release and only source release.
There is no plan to update release in gnuplot 4.

Tatsuro MATSUOKA <tmacchant>
Sun 24 May 2015 05:04:31 AM UTC, comment #11: 

Doesn't seem to cause any problems with gnuplot 4.6.6.  Should this go on stable or default?

Rik <rik5>
Group administrator
Sun 24 May 2015 04:55:14 AM UTC, comment #10: 

Updated changeset attached...

(file #34085)

Dan Sebald <sebald>
Sun 24 May 2015 12:48:13 AM UTC, comment #9: 

@Dan: I'm running gnuplot 4.6.6 so I can test things.  The original cset no longer applies cleanly to the source tree.  Can you update it?

Rik <rik5>
Group administrator
Sat 23 May 2015 12:27:03 PM UTC, comment #8: 

Unmarking as postponed and retitling since gnuplot 5.0 has been out for a while now, and there may never be a 4.7.

Mike Miller <mtmiller>
Group Member
Sat 23 May 2015 06:36:06 AM UTC, comment #7: 

Forgot about this one from long ago...

I don't think __gnuplot_has_feature__ is necessary in this case as < 4.7 appears to accept the limits being swapped and no "reverse/noreverse" specifier.  I'm guessing the "reverse/noreverse" was removed from gnuplot because of the confusion that can result from syntax like this:


set xrange [4:0] reverse;


Should the "reverse" change the range to [0:4]?

If someone else wants to confirm that 4.6 works with the original change, that would save having to detect the feature.  (Which is a slight problem, that I'm going to post to gnuplot discussion, but isn't important here.)

Dan Sebald <sebald>
Mon 28 Oct 2013 03:05:57 AM UTC, comment #6: 

Marking as postponed since gnuplot 4.7 is not yet released.

Mike Miller <mtmiller>
Group Member
Thu 20 Jun 2013 06:18:26 PM UTC, comment #5: 

Thanks.  I'll follow up when 4.7 is released, but if I miss it feel free to apply your change set.

Dan Sebald <sebald>
Thu 20 Jun 2013 12:08:09 AM UTC, comment #4: 

Dan, I modified your changeset slightly to use the function _gnuplot_has_feature_ which is our standard for querying whether gnuplot supports something.  I'm attaching it to this bug report and you can use it if gnuplot does in fact go forward with their proposed modifications in 4.7.

(file #28360)

Rik <rik5>
Group administrator
Wed 19 Jun 2013 10:56:39 PM UTC, comment #3: 

Yes, it is particular to version 4.7 which has or hasn't come out yet.  (I'm using the gnuplot development version on my system.)  The behavior of "reverse" is going to change because it had a property of stickiness meaning once it was set, it wasn't possible to unset it.  I eventually recalled having wondered about this on the gnuplot discussion list:

http://marc.info/?l=gnuplot-info-beta&m=134712826931471&w=2
http://marc.info/?t=124817327100003&r=1&w=2

I would have pursued this particular bug report (bug #38914) if I had felt comfortable with the change gnuplot developers are making, but the proposed change just didn't seem satisfactory so I'm just sort of taking a wait-and-see approach whether this is the final change when 4.7 comes out.  4.7 hasn't been released yet.

The attached patch does check for the version:

+    use_reverse_keyword = compare_versions (_gnuplot_version_ (), "4.7", "<");

so it is ready to go if gnuplot 4.7 is released and has the currently proposed change to "{no}reverse".

Dan Sebald <sebald>
Wed 19 Jun 2013 10:18:36 PM UTC, comment #2: 

Is this particular to a specific version of gnuplot?  I am using gnuplot 4.6.2 and the axis is correctly reversed for me with the existing code.

My test was


graphics_toolkit gnuplot
I = imread ("image.jpg");
image (I);


Rik <rik5>
Group administrator
Tue 07 May 2013 12:45:30 AM UTC, comment #1: 

As I was preparing the changeset I found a similar patch already on my computer.  I must have fixed this a half year ago but didn't get around to submitting the changeset because there was a lot of other activity at the time with getting the GUI more in line with the signal/slot concept.  I can't find any bug report that I created around the time of the original patch.

(file #28037)

Dan Sebald <sebald>
Tue 07 May 2013 12:20:05 AM UTC, original submission:  

The "image" command is not producing an image with the y-axis reversed, although the matryoshka pointer info all looks correct.

The issue is that gnuplot graphics code is using the keyword "reverse"/"noreverse" but that only applies to automatic xrange specifications.  When actual numerical values are given for the range (which is always the case here), the range values (e.g., xlim) need to be reversed.

I will attach a patch after submitting this report.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34085:  octave-gnuplot_axis_reverse-2015may23.patch added by sebald (2KiB - application/octet-stream)
file #28360:  gnuplot_reverse_keyword.cset added by rik5 (4KiB - application/octet-stream)
file #28037:  octave-gnuplot_range_change-2013may06.patch added by sebald (2KiB - application/octet-stream)

 

Carbon-Copy List
  • -email is unavailable- added by tmacchant (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-29 mtmiller Dependencies- bugs #47223 is dependent
    2015-06-24 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-05-24 sebald Attached File- Added octave-gnuplot_axis_reverse-2015may23.patch, #34085
    2015-05-23 mtmiller StatusPostponed Patch Submitted
        SummaryGnuplot axis reverse is not working with gnuplot 4.7 Gnuplot axis reverse is not working with gnuplot 5
    2015-05-23 mtmiller Dependencies- bugs #45167 is dependent
    2013-10-28 mtmiller StatusWorks For Me Postponed
        SummaryGnuplot axis reverse is not working Gnuplot axis reverse is not working with gnuplot 4.7
    2013-06-20 rik5 Attached File- Added gnuplot_reverse_keyword.cset, #28360
    2013-06-19 rik5 StatusNone Works For Me
    2013-05-07 sebald Attached File- Added octave-gnuplot_range_change-2013may06.patch, #28037

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code