[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57303] legend() fails if parent of axes is no
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #57303] legend() fails if parent of axes is not a figure |
Date: |
Tue, 26 Nov 2019 04:17:03 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 |
URL:
<https://savannah.gnu.org/bugs/?57303>
Summary: legend() fails if parent of axes is not a figure
Project: GNU Octave
Submitted by: None
Submitted on: Tue 26 Nov 2019 09:17:01 AM UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name:
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
I'm working on a graphical user-interface and therefore I've got a main figure
with buttons, tables, ... and also panels. I've put a plot inside one of those
panels but get an error when I try to create a legend for this plot.
After some digging in legend.m, I found that at this point
## Also inherit colormap from axes if it is different than figure
cax_cmap = get (cax, "colormap");
display(cax_cmap)
if (! isequal (cax_cmap, get (hpar, "colormap")))
set (hlegend, "colormap", cax_cmap);
endif
it is assumed that _hpar_ has a property called colormap. In my case, _hpar_
is not the main figure but the panel in which the plot is nested. (I'm not
sure why _hpar_ is called at all - isn't it safe to assume that the current
axes are part of the current figure?)
I've attached an example. Thanks in advance!
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 26 Nov 2019 09:17:01 AM UTC Name: bugreport.m Size: 110B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=47932>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57303>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57303] legend() fails if parent of axes is not a figure,
anonymous <=