bugGNU Octave - Bugs: bug #38264, OpenGL: can't change color of text...

 
 

bug #38264: OpenGL: can't change color of text labels in the legend

Submitter:  Ben Abbott <bpabbott>
Submitted:  Tue 05 Feb 2013 02:03:03 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 24 Jun 2013 02:42:25 AM UTC, comment #10: 

Fixed by changeset for bug #37007 (http://hg.savannah.gnu.org/hgweb/octave/rev/4c51eaffa9e4).  Closing report.

Rik <rik5>
Group administrator
Mon 24 Jun 2013 12:37:35 AM UTC, comment #9: 

Marking bug as a duplicate of #37007.

Rik <rik5>
Group administrator
Thu 21 Feb 2013 12:52:53 AM UTC, comment #8: 

refresh () isn't enough to do it.  I actually have to modify something, like the string property, to force the text object to be redrawn.

Rik <rik5>
Group administrator
Thu 21 Feb 2013 12:37:41 AM UTC, comment #7: 

I don't have the time to implement a solution, but it sounds as if an updater needs to be added to graphics.cc/graphics.h.in.

I've done that in the past.  It took be a few hours of study to remind myself how the updating works, and then a few minutes to implement.

In any event, to verify your diagnosis is correct, have you tried "refresh"?

Ben Abbott <bpabbott>
Group Member
Wed 20 Feb 2013 11:25:31 PM UTC, comment #6: 

Ben,

At least you can get text color to work outside of the legend.  Using FLTK-1.10 I can't change the color of any text object.  However printing to pdf is working correctly.  I think Octave is failing to call some updater after it changes the text color.  I can prove this because if I change the text color, and then change the text string forcing an update, both the string and color are updated.

Example that works for me:


plot (1:10);
[hl, hc] = legend ("foo");
# "foo" is in black text
ht = findobj (hc, "type", "text");
set (ht, "color", "m");  # magenta, which is really noticeable
# There is no change in the legend text color.  Now do the following command.
set (ht, "string", "bar")


Rik <rik5>
Group administrator
Wed 06 Feb 2013 02:58:56 PM UTC, comment #5: 
Ben Abbott <bpabbott>
Group Member
Wed 06 Feb 2013 02:29:02 PM UTC, comment #4: 

Right.  Also, I seem to remember that some of the
escape sequences and things like ^ used to work without
setting 'tex' mode.

Anyhow, Figure 15.7 in the Manual is broken in the dev
branch.  I am pretty sure that this is a fairly
recent regression.

Michael Godfrey <godfrey>
Group Member
Wed 06 Feb 2013 02:08:03 PM UTC, comment #3: 

Michael,

I assume you are pointing out the "tex" interpreter is no longer working for the legend's text objects when using the gnuplot toolkit?

Ben

Ben Abbott <bpabbott>
Group Member
Wed 06 Feb 2013 01:55:28 PM UTC, comment #2: 

I've been unable to determine why the color of text objects renders correctly for all text except for those in the legend.  To be sure I wasn't missing something, I tried the following simple example.


plot (rand (3))
[h, hc] = legend ({"first", "second", "third"});
set (findobj (hc, "type", "text"), "color", "b")
print -dpdfwrite test.pdf


The legend text labels displayed remain black, but those in the PDF are blue.  My understanding is that GL2PS produces an EPS of what is displayed.  Thus, I'm inclined to conclude there is no bug in Octave, but maybe one in FLTK 3.0?

In any event, I've attached the displayed figure and the "test.pdf"

file #27403)

Ben Abbott <bpabbott>
Group Member
Tue 05 Feb 2013 02:35:42 PM UTC, comment #1: 

For whoever works on this bug and bug #38264 it would
be useful to also include bug #38261
I think that the use of escape and mode 'tex' worked fairly
recently, but I have not isolated just when or why it stopped
working.

Michael Godfrey <godfrey>
Group Member
Tue 05 Feb 2013 02:03:03 PM UTC, original submission:  

The following has no effect of the text labels for the FLTK toolkit.


plot (rand (3))
[hl, hc] = legend ({"first", "second", "third"});
ht = findobj (hc, "type", "text");
set (ht(1), "color", "b")
set (ht(2), "color", [0 0.5 0])
set (ht(3), "color", "r")



Ben Abbott <bpabbott>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #27402:  displayed.png added by bpabbott (48KiB - image/png - PDF is correct but the FLTK result is not)
file #27403:  test.pdf added by bpabbott (3KiB - application/pdf - PDF is correct but the FLTK result is not)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by bpabbott (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-24 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2013-06-24 rik5 Dependencies- Depends on bugs #37007
    2013-02-06 bpabbott Attached File- Added displayed.png, #27402
        Attached File- Added test.pdf, #27403

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code