bugGNU Octave - Bugs: bug #40256, set (gca, 'xticklabel') command...


bug #40256: set (gca, 'xticklabel') command not working properly (gnuplot)

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sun 13 Oct 2013 04:57:55 PM UTC  
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating 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 Jump to the original submission)

Sat 14 Jun 2014 05:34:23 AM UTC, comment #8:

I backported Stefan's fix to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/9c2ff2361864). The patches that do cleanup I applied to the development branch. Thanks to Stefan's work I'm marking this as fixed and closing the report.

Rik <rik5>
Project Administrator
Sun 02 Mar 2014 02:09:32 AM UTC, comment #7:

I attached three changesets
- ticklabel_minor_grid.diff fixes both errors
- cleanup_ticklabel.diff remove unneeded ticklabel conversions (see bug 34906)
- cleanup_do_tics_1.diff cleanup

Hopefully no new regressions :)

(file #30748, file #30749, file #30750)

Stefan Mahr <dac922>
Sat 01 Mar 2014 03:34:34 PM UTC, comment #6:

The fix for this bug invalidates the fix for bug #38139. It looks like something better needs to be done so that both this bug and #38139 remain fixed at the same time. I'm re-opening both bug reports and cross-referencing them.

Rik <rik5>
Project Administrator
Sat 09 Nov 2013 03:35:11 PM UTC, comment #5:

Also thanks from me Stefan.

Works OK here.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 09 Nov 2013 03:16:51 PM UTC, comment #4:

Thanks Stefan. I applied your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/5740407c25b2). We are nearly there for the release now.

Rik <rik5>
Project Administrator
Fri 08 Nov 2013 10:29:04 PM UTC, comment #3:

Attached patch fixes this bug for the example below.

Rik, there are a lot of ticklabel conversions in _go_draw_axes_.m
Many of this conversions are already done in graphic.cc (see for example bug 34906 ), so I could clean up _go_draw_axes_.m a little bit. But I suggest to do this after the release.

(file #29576)

Stefan Mahr <dac922>
Thu 07 Nov 2013 04:15:51 PM UTC, comment #2:

The problem is not with datetick, but rather with how the command "set (gca, 'xticklabel', ...)" works. Instead of just overwriting the existing labels, this is apparently invoking the auto-axis labeling routine. Simple code to reproduce:

Rik <rik5>
Project Administrator
Mon 14 Oct 2013 12:15:54 AM UTC, comment #1:

Confirmed. And this is a regression from 3.6.4 so I have marked it as such and added it to the 3.8 Bug Fix List before release.

Rik <rik5>
Project Administrator
Sun 13 Oct 2013 04:57:55 PM UTC, original submission:

When invoking datetick, and if datetick needs to recompute the X-axis tick, grid & label positions, it is expected that the previous ticks, vertical grid lines and labels are removed.
When using gnuplot this doesn't happen (fltk works correctly).

Steps to reproduce (use attached data in file series.mat, as those data require datetick to recompute the X-ticks):

load series.mat
graphics_toolkit gnuplot
plot (series(:, 1), series(:, 2))

and you'll get the result in the attached picture.

This works correctly with gnuplot in octave-3.6.4 for MinGW.

If it helps: the oldest 3.7.x I have installed is Michael's 3.7.2+ MSVC snapshot binary, and that has this bug. So it must have sneaked in before Feb 22, 2013 (creation date of octave-3.7.2+.exe)

Philip Nienhuis <philipnienhuis>
Project Member


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

Attach File(s):

Attached Files
file #30748:  ticklabel_minor_grid.diff added by dac922 (5KiB - text/x-patch)
file #30749:  cleanup_ticklabel.diff added by dac922 (3KiB - text/x-patch)
file #30750:  cleanup_do_tics_1.diff added by dac922 (3KiB - text/x-patch)
file #29576:  gnuplot_ticklabel.diff added by dac922 (1KiB - text/x-patch)
file #29366:  gp_datetick.png added by philipnienhuis (17KiB - image/png)
file #29367:  series.mat added by philipnienhuis (3KiB - application/octet-stream)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by dac922 (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by philipnienhuis (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 16 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 14 Jun 2014 05:34:23 AM UTCrik5StatusConfirmed=>Fixed
    Sun 02 Mar 2014 02:09:32 AM UTCdac922Attached File-=>Added ticklabel_minor_grid.diff, #30748
      Attached File-=>Added cleanup_ticklabel.diff, #30749
      Attached File-=>Added cleanup_do_tics_1.diff, #30750
    Sat 01 Mar 2014 03:34:34 PM UTCrik5StatusFixed=>Confirmed
    Sat 01 Mar 2014 03:30:35 PM UTCrik5Dependencies-=>bugs #38139 is dependent
    Sat 09 Nov 2013 03:16:51 PM UTCrik5StatusConfirmed=>Fixed
    Fri 08 Nov 2013 10:29:04 PM UTCdac922Attached File-=>Added gnuplot_ticklabel.diff, #29576
    Thu 07 Nov 2013 04:15:51 PM UTCrik5Summarygnuplot - datetick doesn\'t remove previous X-grid, -ticks & labels=>set (gca, 'xticklabel') command not working properly (gnuplot)
    Mon 14 Oct 2013 12:15:54 AM UTCrik5Item GroupIncorrect Result=>Regression
    Sun 13 Oct 2013 04:57:55 PM UTCphilipnienhuisAttached File-=>Added gp_datetick.png, #29366
      Attached File-=>Added series.mat, #29367

    Back to the top

    Powered by Savane 3.1-cleanup1