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

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

[Octave-bug-tracker] [bug #48533] "grid on" inconsistencies


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #48533] "grid on" inconsistencies
Date: Tue, 30 Aug 2016 15:30:14 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #6, bug #48533 (project octave):

Recent changes to grid improved it significantly. It is even more Matlab
compatible than what I proposed in comment #0. Nevertheless, I don't think
this bug is solved completely. Calling "grid on" twice for semi-log plots
still leads to an inconsistent result:

clf;
semilogy (1:100);
grid on
assert (get (gca, "xgrid"), "on")
assert (get (gca, "ygrid"), "on")
assert (get (gca, "xminorgrid"), "off")
assert (get (gca, "yminorgrid"), "on")  # This is actually what Matlab seems
to do as well.
grid on
assert (get (gca, "xgrid"), "on")
assert (get (gca, "ygrid"), "on")
assert (get (gca, "xminorgrid"), "off")  # This assert fails
assert (get (gca, "yminorgrid"), "on")


The second call should not turn on the minor grid in x-direction (linear
axis).

Also, see Matlab's behavior for a linear plot with minor grid on in one
direction (the same holds for semilogx plots):

>> figure
>> ha = axes();
>> plot(1:10)
>> grid on
>> set(ha, 'XMinorGrid', 'on')
>> grid on
>> get(ha, 'YMinorGrid')
ans =
off


It seems that this is not (any longer?) necessary to follow Matlab, either.
The logic should be removed that turns all minor grids on if only one minor
grid is "on" before calling "grid on".
If nobody objects, I can provide a changeset probably within the next few
days.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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