[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tests in log-scale plots
From: |
John W. Eaton |
Subject: |
tests in log-scale plots |
Date: |
Tue, 6 Sep 2011 10:37:01 -0400 |
On 6-Sep-2011, Carlo de Falco wrote:
| the log-scale plotting functions (semilogx/semilogy/loglog) were removed from
the test statistics with
|
| ## Remove from test statistics. No real tests possible.
| %!assert (1)
n|
| actually a test is indeed possible, for example the following:
|
| %!test
| %! a = logspace (-5, 1, 10);
| %! b =-logspace (-5, 1, 10);
| %! loglog (a, b)
I should have written a better comment. Instead of "No real tests
possible", maybe I should have said something like:
## I can't think of any way to test this function that does not
## require a display and generates a plot. We need to be able to
## run the tests in environments where there is no display. So
## instead of tests, we have to settle for demos.
Also, unless there is an unexpected error, your test doesn't catch
incorrect results without manual inspection, does it? I think that if
a test can't catch incorrect results, then it should be a demo instead.
| catches a bug occurring in all the functions semilogx/semilogy/loglog in
octave <http://savannah.gnu.org/bugs/?33249>,
| while in matlab it is (almost) equivalent to
|
| loglog (a, abs(b), 'ydir', 'reverse')
| set (gca, 'ydir', 'reverse')
|
| woud it make sense to add the test above to semilogx/semilogy/loglog or maybe
a demo like the following?
It's fine to add a demo. But tests should only succeed or fail, not
produce any output or graphics.
jwe
- Re: tests in log-scale plots, (continued)
Re: tests in log-scale plots, Ben Abbott, 2011/09/06
- Re: tests in log-scale plots, c., 2011/09/06
- Re: tests in log-scale plots, Ben Abbott, 2011/09/06
- Re: tests in log-scale plots, John W. Eaton, 2011/09/06
- Re: tests in log-scale plots, c., 2011/09/06
- Re: tests in log-scale plots, Ben Abbott, 2011/09/06
tests in log-scale plots,
John W. Eaton <=
Re: tests in log-scale plots, Ben Abbott, 2011/09/06
- Re: tests in log-scale plots, c., 2011/09/07
- Re: tests in log-scale plots, bpabbott, 2011/09/07
- Re: tests in log-scale plots, c., 2011/09/07
- Re: tests in log-scale plots, bpabbott, 2011/09/07
- Re: tests in log-scale plots, Ben Abbott, 2011/09/10
- Re: tests in log-scale plots, Ben Abbott, 2011/09/11