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

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

[Octave-bug-tracker] [bug #48616] Matlab compatibility for semilogx() an


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #48616] Matlab compatibility for semilogx() and xlim([0 uplim])
Date: Sun, 24 Jul 2016 17:56:58 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17

Follow-up Comment #1, bug #48616 (project octave):

I can confirm Matlab's behavior (I recently noticed Matlab's behavior). As a
point of clarification, Matlab ignores leading zeros in the data when the
corresponding axes scale is 'log'

xdata = 0:1:10;
ydata = 0:1:10;
clear ax h
ax(1) = subplot (2,2,1);
h(1) = plot (xdata, ydata);
ax(2) = subplot (2,2,2);
h(2) = plot (xdata, ydata);
set (gca (), 'xscale', 'log')
ax(3) = subplot (2,2,3);
h(3) = plot (xdata, ydata);
set (gca (), 'yscale', 'log')
ax(4) = subplot (2,2,4);
h(4) = plot (xdata, ydata);
set (gca (), 'xscale', 'log', 'yscale', 'log')

cell2mat (get (h, 'xdata'))
cell2mat (get (h, 'ydata'))

yields

ans =
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10
ans =
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10
     0     1     2     3     4     5     6     7     8     9    10

Iv'e attached the resulting plot.


(file #38006)
    _______________________________________________________

Additional Item Attachment:

File name: xscale or yscale is log.png    Size:42 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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