bugGNU Octave - Bugs: bug #36136, TextColor property of legend...

 
 

bug #36136: TextColor property of legend object *always* renders as black

Submitter:  Rik <rik5>
Submitted:  Mon 09 Apr 2012 03:32:01 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  In Progress Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 23 Jun 2013 11:46:31 PM UTC, comment #5: 

The problem is not with legend, but rather that the color property does not work with Text objects and OpenGL (see bug #37007).  Closing report.

Rik <rik5>
Group administrator
Sat 28 Apr 2012 02:50:24 AM UTC, comment #4: 

Using the fltk backend, the printed output has the correct color.

The command below displays black text labels for the legend.


demo legend 1


The printed result, has bright pink text.


demo legend 1
print -dpdfwrite test.pdf



Ben Abbott <bpabbott>
Group Member
Sat 28 Apr 2012 02:41:24 AM UTC, comment #3: 

I'm not able to determine where the remaining bug is.


demo legend 1
    legend example 1:
    plot (rand (2,2)) ;
    h = legend ('a', 'b') ;
    legend ('right') ;
    set (h, 'textposition', 'left')
    set (h, 'textposition', 'right')
    set (h, 'textcolor', [1 0 1])
hl = findall (gcf (), 'type', 'axes', 'tag', 'legend');
ht = findobj (hl, 'type', 'text')
ht =

  -29.649
  -28.020

get (ht, 'color')
ans =
{
  [1,1] =

     1   0   1

  [2,1] =

     1   0   1

}


The text objects have the correct "color", but still render black

Ben Abbott <bpabbott>
Group Member
Sat 28 Apr 2012 02:26:01 AM UTC, comment #2: 

I pushed a 2nd changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/7d11812c52aa

The line colors are now correct, but the text color for the legend entries are still incorrect.

Ben Abbott <bpabbott>
Group Member
Fri 27 Apr 2012 05:13:54 PM UTC, comment #1: 

This looks to be two bugs. One for the gnuplot backend, and the other for the OpenGL backends.

The OpenGL, changing the "textcolor" property changes the color of the graphics objects used in the legend.

For gnuplot, I've pushed a changetset.

http://hg.savannah.gnu.org/hgweb/octave/rev/721442e1b82c

I'm changing the category and is for OpenGL.

Ben Abbott <bpabbott>
Group Member
Mon 09 Apr 2012 03:32:01 AM UTC, original submission:  

The TextColor property is supposed to change the color of the text in the legend.  Instead, it is changing the color of the line object in the legend key.

Sample code:


plot (1:10, "o-b");
hl = legend ("line1");   # legend with blue key and black text
set (hl, "TextColor", [1 0 1]);   # Nice hot pink color


Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-23 rik5 Open/ClosedOpen Closed
    2012-04-28 bpabbott StatusNone In Progress
    2012-04-28 bpabbott SummaryTextColor property of legend object affecting wrong object TextColor property of legend object always renders as black
    2012-04-27 bpabbott CategoryPlotting Plotting with OpenGL

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code