octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #33869] minor ticks disappear from log plot wi


From: Ronald
Subject: [Octave-bug-tracker] [bug #33869] minor ticks disappear from log plot with specified xticklabels
Date: Thu, 15 Nov 2012 09:43:56 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0

Follow-up Comment #3, bug #33869 (project octave):

I may have a simple solution.

Using the *add* keyword with set ytics in gnuplot preserves any existing
ticks, including the minor ticks. See:
http://gnuplot.sourceforge.net/docs_4.2/node295.html

If you set the ticks using the *add* keyword on the exact positions of all the
old ticks, they will be overwritten. It seems to me that octave does this
anyway, so just adding the *add* keyword may be a valid solution.

I did this patch on /usr/share/octave/3.6.1/m/plot/private/__go_draw_axes__.m
:

@@ -2139,10 +2139,10 @@
         nlabels = numel (labels);
         fprintf (plot_stream, "set format %s "%%s";n", ax);
         if (mirror)
-          fprintf (plot_stream, "set %stics %s %s %s mirror (", ax,
+          fprintf (plot_stream, "set %stics add %s %s %s mirror (", ax,
                    tickdir, ticklength, axispos);
         else
-          fprintf (plot_stream, "set %stics %s %s %s nomirror (", ax,
+          fprintf (plot_stream, "set %stics add %s %s %s nomirror (", ax,
                    tickdir, ticklength, axispos);
         endif

It works for me. Minor ticks and minor grid are now still present after
manually setting the ticklabels without any side-effects so far.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33869>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]