help-octave
[Top][All Lists]
Advanced

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

Re: Can I suppress this warning? warning: axis: omitting non-positive da


From: Kai Torben Ohlhus
Subject: Re: Can I suppress this warning? warning: axis: omitting non-positive data in log plot
Date: Tue, 26 Mar 2019 07:16:59 +0100

On Mon, Mar 25, 2019 at 11:25 PM GoSim <address@hidden> wrote:
I get it when plotting logplots.
warning: axis: omitting non-positive data in log plot

I googled and found this:
https://octave.sourceforge.io/octave/function/warning_ids.html
warning('off', 'Octave:possible-matlab-short-circuit-operator');

I have used this method before but I don't find this particiular warning.
Does it have a ID?


You can use the lastwarn function to obtain the ID of interest:

>> loglog(-1:10)
warning: axis: omitting non-positive data in log plot
  [...]
>> [~,id] = lastwarn ()
id = Octave:negative-data-log-axis
>> warning ("off", "Octave:negative-data-log-axis");
>> loglog(-1:10)

HTH,
Kai

reply via email to

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