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

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

[Octave-bug-tracker] [bug #52641] 'legend' + 'hold on' produces unnecess


From: Hartmut
Subject: [Octave-bug-tracker] [bug #52641] 'legend' + 'hold on' produces unnecessary error
Date: Mon, 11 Dec 2017 14:27:47 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

URL:
  <http://savannah.gnu.org/bugs/?52641>

                 Summary: 'legend' + 'hold on' produces unnecessary error
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Mon 11 Dec 2017 07:27:46 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Here is a short script to show the behavior:


clear;
close all;

graphics_toolkit qt % same error with fltk and gnuplot 

x = 0:10;

plot(x, x+1)
legend('x+1');

hold on
plot(x, x+2);
hold off

legend('', 'x+2'); % first string is empty -> error


This code produces the following error message under Octave (4.2.1 release and
current dev branch):


error: hplots(1): out of bound 0
execution error in graphics callback function


Once I change the first (empty) string in the last legend command to something
non-empty, then the error message dissappears.

Running the same code in Matlab (R2017b) does NOT throw any error message. 

The resulting figure looks fine to me, for both Octave and Matlab.

Changing the graphics toolkit to fltk or to gnuplot both still gives the very
same error.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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